diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 037dddec9692e670fceccd3e9e77cbe9930c7a00..898325a0dbc7f65c836b7307e56f8a9a1840ce57 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,6 +25,13 @@ workflow: rules: # If `$FORCE_GITLAB_CI` is set, create a pipeline. - if: '$FORCE_GITLAB_CI' + # As part of the process of creating RCs automatically, we update stable + # branches with the changes of the most recent production deployment. The + # merge requests used for this merge a branch release-tools/X into a stable + # branch. For these merge requests we don't want to run any pipelines, as + # they serve no purpose and will run anyway when the changes are merged. + - if: '$CI_COMMIT_BRANCH =~ /^release-tools\/\d+\.\d+\.\d+-rc\d+$/ && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^[\d-]+-stable(-ee)?$/ && $CI_PROJECT_PATH == "gitlab-org/gitlab"' + when: never # For merge requests, create a pipeline. - if: '$CI_MERGE_REQUEST_IID' # For `master` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).