diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5453668d8b685ba3031112562fb82bc52fdb08d5..6a71e40c6b78e54842afa4cb1ae800446fc66ace 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,15 +9,6 @@ stages: default: tags: - silicon - rules: - - if: '$CI_COMMIT_BRANCH == "master"' - when: on_success - - if: '$CI_COMMIT_BRANCH =~ /^v[0-9]+\.[0-9]-stable/' - when: on_success - - if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/' - when: on_success - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - when: on_success artifacts: paths: - .ci-env @@ -46,6 +37,15 @@ detect_changes:release: ## Init our job for our desired branches/tags/events init: stage: config + rules: + - if: '$CI_COMMIT_BRANCH == "master"' + when: on_success + - if: '$CI_COMMIT_BRANCH =~ /^v[0-9]+\.[0-9]-stable/' + when: on_success + - if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/' + when: on_success + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: on_success script: - ./ci/configure_pipeline.sh ci/build_and_deploy.yml.in artifacts: @@ -55,6 +55,15 @@ init: ## Dispatch if we ran the previous stage run:default: stage: build_and_deploy + rules: + - if: '$CI_COMMIT_BRANCH == "master"' + when: on_success + - if: '$CI_COMMIT_BRANCH =~ /^v[0-9]+\.[0-9]-stable/' + when: on_success + - if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/' + when: on_success + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: on_success trigger: include: - artifact: build_and_deploy.yml