summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorMichel Dänzer <mdaenzer@redhat.com>2020-09-08 12:31:08 +0200
committerMarge Bot <eric+marge@anholt.net>2020-09-21 15:13:03 +0000
commitf79ae945380f01470e1cc7dc17a08e65dd4fd723 (patch)
tree2c135a49005cd29d2e3c8c6e5115b1b2d7e1c659 /.gitlab-ci.yml
parentac56d6699270c0027563c3311fa8a5b418b481d0 (diff)
ci: Add "is pre-merge pipeline for Marge Bot" YAML anchor
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6566>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml7
1 files changed, 5 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1508a33c602..542ec0d9935 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -47,6 +47,9 @@ stages:
# Pipeline runs for the master branch of the main project
- if: &is-main-master '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == "master"'
when: always
+ # Pre-merge pipeline for Marge Bot
+ - if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
+ when: on_success
.docs-base:
@@ -79,7 +82,7 @@ test-docs:
stage: container+docs
rules:
- *ignore_scheduled_pipelines
- - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
+ - if: *is-pre-merge-for-marge
changes: *docs-or-ci
when: on_success
- if: '$GITLAB_USER_LOGIN != "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME && $CI_PROJECT_PATH == "mesa/mesa"'
@@ -186,7 +189,7 @@ success:
when: on_success
# Run pipeline by default if it was triggered by Marge Bot, is for a
# merge request, and any files affecting the pipeline were changed
- - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
+ - if: *is-pre-merge-for-marge
changes:
*all_paths
when: on_success