ci: shorter rules:if condition

This commit is contained in:
MDLeom 2020-12-12 21:43:52 +00:00
parent 1cfa7ce66b
commit 7417d07159
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 3 additions and 8 deletions

View File

@ -38,11 +38,8 @@ deploy_job:
- git push origin master
rules:
# Only trigger through schedule job in master branch
- if: '$CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule"'
when: always
# Only trigger through "Run pipeline" in master branch
- if: '$CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "web"'
# Only trigger through schedule job and "Run pipeline" in master branch
- if: '$CI_COMMIT_REF_NAME == "master" && ($CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web")'
when: always
# Upload working folder as a job artifact
@ -76,8 +73,6 @@ failed_job:
- git push origin master
rules:
- if: '$CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_COMMIT_REF_NAME == "master" && ($CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web")'
# Run this job only when deploy_job failed
when: on_failure
- if: '$CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "web"'
when: on_failure