Update .gitlab-ci.yml file

This commit is contained in:
Adrien Bourmault 2022-10-10 16:19:41 +00:00
parent 862527d60d
commit c7e557fcbd
1 changed files with 14 additions and 2 deletions

View File

@ -23,10 +23,22 @@ stages: # List of stages for jobs, and their order of execution
test-job: # This job runs in the test stage. test-job: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully. stage: test # It only starts when the job in the build stage completes successfully.
script: script:
- echo "Test des zones $(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)." - |+
if [ -z "$CI_COMMIT_SHA" ]; then
files=$(find . -name "*.zone" -printf %P)
else
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)
- echo "Test des zones $files."
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 "Déploiement des zones $(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)..." - |+
if [ -z "$CI_COMMIT_SHA" ]; then
files=$(find . -name "*.zone" -printf %P)
else
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)
- echo "Déploiement des zones $files..."
- echo "Déploiement terminé." - echo "Déploiement terminé."