summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorMichel Dänzer <mdaenzer@redhat.com>2020-08-27 09:36:22 +0200
committerMarge Bot <eric+marge@anholt.net>2020-08-27 10:36:07 +0000
commit45793c00d29507c6de0193fbd6c627191ba50bed (patch)
treec05e6e8d28f9be94b75258f6766fc5f4356d1324 /.gitlab-ci.yml
parent502b9daa7aaee27f63cc1fa8f755fdf0a0fedcfa (diff)
ci: Fix up rules for post-merge / main project branch pipelines
Pre-merge pipelines for MRs appear to run in the target project namespace now, so we have to explicitly rule those out. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6481>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml4
1 files changed, 2 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 47ca4bb20c2..a8911789086 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -167,7 +167,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"'
+ - if: '$CI_PROJECT_PATH == "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
changes:
- .gitlab-ci.yml
- .gitlab-ci/**/*
@@ -180,7 +180,7 @@ success:
when: on_success
# Run pipeline by default in the main project if it was not triggered by
# Marge Bot, and any files affecting the pipeline were changed
- - if: '$GITLAB_USER_LOGIN != "marge-bot" && $CI_PROJECT_PATH == "mesa/mesa"'
+ - if: '$GITLAB_USER_LOGIN != "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME && $CI_PROJECT_PATH == "mesa/mesa"'
changes:
*all_paths
when: on_success