From 3fe0cec4c1b1b16635ed9bb510007e4d166c3e07 Mon Sep 17 00:00:00 2001 From: Helen Koike Date: Wed, 16 Aug 2023 13:09:17 -0300 Subject: [PATCH] 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 Part-of: --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) 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: