From 1913226504e7b7c9b324d3afa64ad83ee92cbdbe Mon Sep 17 00:00:00 2001 From: Jonathan Rich Date: Mon, 8 Jun 2026 11:59:51 -0400 Subject: [PATCH] QA-354 Prevent duplicate pipelines for MRs --- .gitlab-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 90b08af..7c78ec8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,6 +15,16 @@ variables: MIRROR_ORG_NAME: "kasmtech" default: retry: 2 + +# Prevent duplicate pipelines for push events to branches that also have open MRs +workflow: + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + when: always + - if: $CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS + when: never + - when: always + before_script: - export SANITIZED_BRANCH="$(echo $CI_COMMIT_REF_NAME | sed -r 's#^release/##' | sed 's/\//_/g')"