Update .gitlab-ci.yml file

This commit is contained in:
Adrien Bourmault 2022-10-10 16:43:08 +00:00
parent faa550e0ae
commit ae004efc82
1 changed files with 3 additions and 5 deletions

View File

@ -29,19 +29,17 @@ test-job: # This job runs in the test stage.
files=$(find . -name "*.zone" -printf %P) files=$(find . -name "*.zone" -printf %P)
echo "Pipeline régulier" echo "Pipeline régulier"
else else
#files=$(echo $(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA) | grep zone) files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)
echo "Pipeline exceptionnel" echo "Pipeline exceptionnel"
fi fi
- |+ - |+
if [ -z "$files" ]; then if [ ! "$files" =~ .*"zone".* ]; then
echo "Pas de fichier de zone à tester" echo "Pas de fichier de zone à tester"
else else
echo "Test des zones $files." echo "Test des zones $files."
fi fi
- test -z "$files" && echo yep
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:
@ -50,7 +48,7 @@ deploy-job: # This job runs in the deploy stage.
then then
files=$(find . -name "*.zone" -printf %P) files=$(find . -name "*.zone" -printf %P)
else else
files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA | grep zone) files=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)
fi fi
- echo "Déploiement des zones $files..." - echo "Déploiement des zones $files..."