execute jobs only if all previous jobs in previous stages succeded, e.g. in case of error in windows job dont push the linux docker container or change the tag yet

This commit is contained in:
Marcel Märtens 2021-07-22 12:05:30 +02:00
parent 09eff33562
commit 5e21430204
2 changed files with 4 additions and 4 deletions

View File

@ -4,14 +4,14 @@
stage: publish
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE != "schedule"
when: always
when: on_success
- when: never
.publish-nightly:
stage: publish
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"
when: always
when: on_success
- when: never
docker:

View File

@ -12,7 +12,7 @@
stage: build
rules:
- if: $CI_PIPELINE_SOURCE != "merge_request_event" && $CI_PIPELINE_SOURCE != "schedule" && ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/)
when: always
when: on_success
- when: never
# Template to only run if pushes to master or a tag happened for scheduled builds
@ -20,5 +20,5 @@
stage: build-nightly
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/)
when: always
when: on_success
- when: never