# HG changeset patch # User Pierre-Yves David # Date 1731626977 -3600 # Node ID ff1d4b2df8bdac378728211719a3e6435f214012 # Parent d237fdd93eb97e6e5d44dc4a0780f7380fec7212 ci: abstract the branch matching regexp This is less error prone and make debugging branch-only pipeline simpler. diff -r d237fdd93eb9 -r ff1d4b2df8bd contrib/heptapod-ci.yml --- a/contrib/heptapod-ci.yml Thu Nov 14 16:44:32 2024 +0100 +++ b/contrib/heptapod-ci.yml Fri Nov 15 00:29:37 2024 +0100 @@ -31,6 +31,14 @@ image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG variables: + # to debug use: + # + # RE_BRANCH: '/^topic/.+/.+$/' + # RE_TOPIC: '/^xxx/' + # + # Instead of the two following lines: + RE_BRANCH: '/^branch/.+$/' + RE_TOPIC: '/^topic/.+/.+$/' PYTHON: python HG_CI_IMAGE_TAG: "v2.1" # a directory dedicated to creating files and temporary clone @@ -480,7 +488,7 @@ # because we don't want to upload only half of a wheel interruptible: false rules: - - if: $CI_COMMIT_BRANCH =~ /^branch\/.*/ + - if: '$CI_COMMIT_BRANCH =~ $RE_BRANCH' # note that at the time of writing this, this job depends on multiple # manual one. So it will not run by default, but will automatically run # if the manual jobs are triggered. @@ -489,7 +497,7 @@ # directly depends on. This currently relevant for the "test-3.x-c" # tests. when: on_success - - if: $CI_COMMIT_BRANCH =~ /^topic\/.*/ + - if: '$CI_COMMIT_BRANCH =~ $RE_TOPIC' when: never # if you need to test this, make it # when: manual