From 5e21430204c40d79add49a85925c3e13f476ab56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=A4rtens?= Date: Thu, 22 Jul 2021 12:05:30 +0200 Subject: [PATCH] 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 --- .gitlab/CI/publish.gitlab-ci.yml | 4 ++-- .gitlab/CI/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab/CI/publish.gitlab-ci.yml b/.gitlab/CI/publish.gitlab-ci.yml index 21b82d3cbd..08fc073284 100644 --- a/.gitlab/CI/publish.gitlab-ci.yml +++ b/.gitlab/CI/publish.gitlab-ci.yml @@ -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: diff --git a/.gitlab/CI/release.yml b/.gitlab/CI/release.yml index 6fa6378edd..87484d7816 100644 --- a/.gitlab/CI/release.yml +++ b/.gitlab/CI/release.yml @@ -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