CI affinée

This commit is contained in:
Adrien Bourmault 2022-04-11 14:25:35 +00:00
parent 4e220c164e
commit 6178470dd9
1 changed files with 20 additions and 3 deletions

View File

@ -14,12 +14,29 @@
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages # For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages
stages: # List of stages for jobs, and their order of execution stages: # List of stages for jobs, and their order of execution
- build
- test
- deploy - deploy
build-job:
stage: build
script:
- echo "Récupération du dernier `git push`..."
- cd /home/webmaster/articles
- git checkout -- .
- git pull
test-job:
stage: test
script:
- echo "Exécution de `gsl check -F`..."
- cd /home/webmaster/articles
- gsl check -F
deploy-job: # This job runs in the deploy stage. deploy-job: # This job runs in the deploy stage.
stage: deploy # It only runs when *both* jobs in the test stage complete successfully. stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
script: script:
- echo "Récupération du dernier `git push`..." - echo "Déploiement..."
- cd /home/webmaster/articles && git checkout -- . && git pull - cd /home/webmaster/articles
- gsl check && gsl make - gsl make -F && gsl make
- echo "Déploiement terminé." - echo "Déploiement terminé."