# HG changeset patch # User Raphaël Gomès # Date 1688374956 -7200 # Node ID 429880fd984c7b61a34c0ca23b738a2a55e6b92c # Parent b852c34dc2b897190da141be8663269669a9231b heptapod-ci: don't run pipelines for topic-less branches See inline comment for more details. diff -r b852c34dc2b8 -r 429880fd984c contrib/heptapod-ci.yml --- a/contrib/heptapod-ci.yml Tue Jun 27 16:19:42 2023 +0200 +++ b/contrib/heptapod-ci.yml Mon Jul 03 11:02:36 2023 +0200 @@ -1,3 +1,20 @@ +# Don't run pipelines on branch "merge", since we're fast-forward only. +# Gitlab sees a new branch (since e.g. `topic/stable/my-topic` becomes +# `branch/stable`), but the hash hasn't changed. There is no reason to +# re-run the CI in our case, since we haven't built up any specific automation. +# Right now it's just wasted CI and developer time. +# One can still run the pipeline manually via the web interface or a push, +# like in the case of releases, to make *extra* sure that the actual branch +# has succeeded. +workflow: + rules: + - if: $CI_COMMIT_BRANCH =~ /^branch\// && $CI_PIPELINE_SOURCE != "web" && $CI_PIPELINE_SOURCE != "push" + when: never + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS + when: never + - if: $CI_COMMIT_BRANCH + stages: - tests