Skip to content

gitlab-ci: Prevent duplicate pipelines in MRs from certain branches

An MR from a source branch matching the /^(lava-)?ci([-/].*)?$/ pattern triggered two duplicate pipelines for each push. Prevent this by excluding $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME matching the same pattern.

Due to LAVA and non-LAVA jobs using different patterns, there will still be two pipelines in these cases, but each job will only run in one or the other, not in both.

v2:

  • Corresponding treatment for LAVA as well.
Edited by Michel Dänzer

Merge request reports