Skip to content
Snippets Groups Projects
Commit 8914bef4 authored by FETCHEPING FETCHEPING Rossif Borel's avatar FETCHEPING FETCHEPING Rossif Borel
Browse files

Update .gitlab-ci.yml file

parent 224f337a
Branches
Tags v0.1.0
No related merge requests found
image: python:3.8-alpine image: python:3.8-alpine
#workflow: workflow:
# rules: rules:
# - if: $CI_COMMIT_BRANCH == "main" - if: $CI_COMMIT_BRANCH == "main"
stages: # List of stages for jobs, and their order of execution stages: # List of stages for jobs, and their order of execution
- test - test
...@@ -10,7 +10,7 @@ stages: # List of stages for jobs, and their order of execution ...@@ -10,7 +10,7 @@ stages: # List of stages for jobs, and their order of execution
- deploy - deploy
#Job de test de qualité de code Python de l'API #Job de test de qualité de code Python de l'API
.lint_test_job: lint_test_job:
stage: test stage: test
script: script:
- rm -rf docs/api/lint.md && touch docs/api/lint.md - rm -rf docs/api/lint.md && touch docs/api/lint.md
...@@ -24,7 +24,7 @@ stages: # List of stages for jobs, and their order of execution ...@@ -24,7 +24,7 @@ stages: # List of stages for jobs, and their order of execution
#allow_failure: true #allow_failure: true
#Job de test end to end de l'API #Job de test end to end de l'API
.e2e_test_job: e2e_test_job:
stage: test stage: test
script: script:
- rm -rf docs/api/unit.md && touch docs/api/unit.md - rm -rf docs/api/unit.md && touch docs/api/unit.md
...@@ -36,7 +36,7 @@ stages: # List of stages for jobs, and their order of execution ...@@ -36,7 +36,7 @@ stages: # List of stages for jobs, and their order of execution
- docs - docs
#Job de test de couverture de code Python de l'API #Job de test de couverture de code Python de l'API
.cov_test_job: cov_test_job:
stage: test stage: test
script: script:
- rm -rf docs/api/coverage.md && touch docs/api/coverage.md - rm -rf docs/api/coverage.md && touch docs/api/coverage.md
...@@ -48,7 +48,7 @@ stages: # List of stages for jobs, and their order of execution ...@@ -48,7 +48,7 @@ stages: # List of stages for jobs, and their order of execution
- docs - docs
#Job de test de qualité de code HTML, JS et CSS #Job de test de qualité de code HTML, JS et CSS
.front_test_job: front_test_job:
image: node:16 image: node:16
stage: test stage: test
script: script:
...@@ -63,7 +63,7 @@ stages: # List of stages for jobs, and their order of execution ...@@ -63,7 +63,7 @@ stages: # List of stages for jobs, and their order of execution
paths: paths:
- docs - docs
.docker_lint_job: docker_lint_job:
image: hadolint/hadolint:latest-alpine image: hadolint/hadolint:latest-alpine
script: script:
- rm -rf docs/docker/lint.md && touch docs/docker/lint.md - rm -rf docs/docker/lint.md && touch docs/docker/lint.md
...@@ -76,7 +76,7 @@ stages: # List of stages for jobs, and their order of execution ...@@ -76,7 +76,7 @@ stages: # List of stages for jobs, and their order of execution
- docs - docs
# Job de génération des pages pour le reporting des tests # Job de génération des pages pour le reporting des tests
.pages: pages:
stage: deploy stage: deploy
script: script:
- pip install mkdocs-material - pip install mkdocs-material
...@@ -97,17 +97,14 @@ variables: ...@@ -97,17 +97,14 @@ variables:
TAG_API_LATEST: $CI_REGISTRY_IMAGE/vapormap_api:latest TAG_API_LATEST: $CI_REGISTRY_IMAGE/vapormap_api:latest
TAG_FRONT_COMMIT: $CI_REGISTRY_IMAGE/vapormap_front:$CI_COMMIT_SHA TAG_FRONT_COMMIT: $CI_REGISTRY_IMAGE/vapormap_front:$CI_COMMIT_SHA
TAG_FRONT_LATEST: $CI_REGISTRY_IMAGE/vapormap_front:latest TAG_FRONT_LATEST: $CI_REGISTRY_IMAGE/vapormap_front:latest
DOCKER_TLS_CERTDIR: ""
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
# Job de build et push des images docker # Job de build et push des images docker
build: build:
stage: build stage: build
#variables: variables:
# DOCKER_TLS_CERTDIR: "" DOCKER_TLS_CERTDIR: ""
# DOCKER_HOST: tcp://docker:2375/ DOCKER_HOST: tcp://docker:2375/
# DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
services: services:
- docker:20.10-dind - docker:20.10-dind
image: docker:20.10 image: docker:20.10
...@@ -121,15 +118,15 @@ build: ...@@ -121,15 +118,15 @@ build:
- docker build -f Dockerfile.front -t $TAG_FRONT_COMMIT -t $TAG_FRONT_LATEST . - docker build -f Dockerfile.front -t $TAG_FRONT_COMMIT -t $TAG_FRONT_LATEST .
- docker push $TAG_FRONT_COMMIT - docker push $TAG_FRONT_COMMIT
- docker push $TAG_FRONT_LATEST - docker push $TAG_FRONT_LATEST
# needs: needs:
# - job: lint_test_job - job: lint_test_job
# - job: e2e_test_job - job: e2e_test_job
# - job: cov_test_job - job: cov_test_job
# - job: front_test_job - job: front_test_job
# - job: docker_lint_job - job: docker_lint_job
# Job de deploy des images docker sur la VM avec docker-compose # Job de deploy des images docker sur la VM avec docker-compose
.deploy: deploy:
stage: deploy stage: deploy
tags: tags:
- vm-imt - vm-imt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment