aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorHelen Koike <helen.koike@collabora.com>2023-08-16 13:09:17 -0300
committerMarge Bot <emma+marge@anholt.net>2023-08-17 03:45:39 +0000
commit3fe0cec4c1b1b16635ed9bb510007e4d166c3e07 (patch)
treec1c653a5d1fec736b32f12f88439d65a6bc19f3a /.gitlab-ci.yml
parent9a2a0c6fa3bf59ca13b7eb2e9c91b51dd514f0ff (diff)
downloadmesa3d-3fe0cec4c1b1b16635ed9bb510007e4d166c3e07.tar.gz
ci: disable duplicated pipelines triggered by marge
When Marge rebases, it creates two pipelines, one in the author's account due to the rebase and another one in the target account due to the merge request event. Depending on the order they appear, Marge erroneously check the author's pipeline, and since it doesn't have the rights to start this pipeline, Marge fails to merge because it timed out (since the pipeline never got run). Fix this by disabling the author's pipeline (source of type "push") when a merge request is open. We only disable when the pipeline is triggered by marge to not affect running ci_run_n_monitor.py script Signed-off-by: Helen Koike <helen.koike@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24730>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml3
1 files changed, 3 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dee471b1d46..b9b92784a8a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,8 @@
workflow:
rules:
+ # do not duplicate pipelines on merge pipelines
+ - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push" && $GITLAB_USER_LOGIN == "marge-bot"
+ when: never
# merge pipeline
- if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_COMMIT_BRANCH == null
variables: