From 3f64b12c1e6114e9d44000eeabf30b4e60a3608b Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 15 Sep 2023 18:13:07 +0100 Subject: [PATCH] ci: drop confusing fake `rules`, `if` and `when` on the list of rules strings These are not real rules, they are just strings that have an anchor that can be referenced elsewhere in this file. Having these fake bits in here is confusing, as revealed by the reactions from the first version of this commit. Part-of: --- .gitlab-ci.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d86f2f6bbb..d63be7d3770 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -138,19 +138,14 @@ include: # YAML anchors for rule conditions # -------------------------------- .rules-anchors: - rules: - # Post-merge pipeline - - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH' - when: on_success - # Post-merge pipeline, not for Marge Bot - - if: &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH' - when: on_success - # Pre-merge pipeline - - if: &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"' - when: on_success - # Pre-merge pipeline for Marge Bot - - if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"' - when: on_success + # Post-merge pipeline + - &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_BRANCH' + # Post-merge pipeline, not for Marge Bot + - &is-post-merge-not-for-marge '$CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot" && $CI_COMMIT_BRANCH' + # Pre-merge pipeline + - &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"' + # Pre-merge pipeline for Marge Bot + - &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"' .container+build-rules: