ci: Add "is forked branch or pre-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>
This commit is contained in:
Michel Dänzer 2020-09-08 17:30:49 +02:00 committed by Marge Bot
parent a33026ee7c
commit 24f5329e2a
1 changed files with 4 additions and 1 deletions

View File

@ -44,6 +44,9 @@ stages:
# --------------------------------
.rules-anchors:
rules:
# Forked project branch / pre-merge pipeline
- if: &is-forked-branch-or-pre-merge '$CI_PROJECT_PATH != "mesa/mesa" || $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
when: manual
# 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
@ -91,7 +94,7 @@ test-docs:
- if: *is-post-merge-not-for-marge
changes: *docs-or-ci
when: on_success
- if: '$CI_PROJECT_PATH != "mesa/mesa" || $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
- if: *is-forked-branch-or-pre-merge
changes: *docs-or-ci
when: manual
# Other cases default to never