Mesa (master): ci: Add "is post-merge pipeline" YAML anchor
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Sep 21 15:28:56 UTC 2020
Module: Mesa
Branch: master
Commit: b47f1bbff98ef94db4eccdbff987bb12836e6881
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b47f1bbff98ef94db4eccdbff987bb12836e6881
Author: Michel Dänzer <mdaenzer at redhat.com>
Date: Tue Sep 8 17:47:18 2020 +0200
ci: Add "is post-merge pipeline" YAML anchor
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6566>
---
.gitlab-ci.yml | 7 +++++--
1 file 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/**/*
More information about the mesa-commit
mailing list