Update .gitlab-ci.yml file

This commit is contained in:
Adrien Bourmault 2022-10-10 16:39:59 +00:00
parent d7e957f9e4
commit b7d07b8287
1 changed files with 6 additions and 4 deletions

View File

@ -24,11 +24,12 @@ test-job: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully.
script:
- |+
if [ -z "$CI_COMMIT_SHA" ]; then
files=$(find . -name "*.zone" -printf %P)
if [ -z "$CI_COMMIT_SHA" ]
then
#files=$(find . -name "*.zone" -printf %P)
echo "Pipeline régulier"
else
files=$(echo $(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA) | grep zone)
#files=$(echo $(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA) | grep zone)
echo "Pipeline exceptionnel"
fi
@ -45,7 +46,8 @@ deploy-job: # This job runs in the deploy stage.
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
script:
- |+
if [ -z "$CI_COMMIT_SHA" ]; then
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 | grep zone)