summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorMichel Dänzer <mdaenzer@redhat.com>2020-09-08 17:47:18 +0200
committerMarge Bot <eric+marge@anholt.net>2020-09-21 15:13:03 +0000
commitb47f1bbff98ef94db4eccdbff987bb12836e6881 (patch)
tree1c642c3357c690910a2c6109fc1caa93ce2b80c5 /.gitlab-ci.yml
parent22a7c252dc9abb75b1ad4034057e44a3681d326e (diff)
ci: Add "is post-merge pipeline" 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 cd9e9d5535b..729a1f41c7b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -53,6 +53,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
+ # Post-merge pipeline
+ - if: &is-post-merge '$CI_PROJECT_NAMESPACE == "mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
+ when: on_success
# Post-merge pipeline, not for Marge Bot
- if: &is-post-merge-not-for-marge '$GITLAB_USER_LOGIN != "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME && $CI_PROJECT_PATH == "mesa/mesa"'
when: on_success
@@ -141,7 +144,7 @@ success:
image: debian:stable-slim
rules:
- *ignore_scheduled_pipelines
- - if: '$CI_PROJECT_NAMESPACE == "mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
+ - if: *is-post-merge
when: never
- if: '$GITLAB_USER_LOGIN == "marge-bot"'
changes: *docs-or-ci
@@ -191,7 +194,7 @@ success:
- *ignore_scheduled_pipelines
# Run pipeline by default in the main project if any CI pipeline
# configuration files were changed, to ensure docker images are up to date
- - if: '$CI_PROJECT_PATH == "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
+ - if: *is-post-merge
changes:
- .gitlab-ci.yml
- .gitlab-ci/**/*