Control which branches are tested via environment variable
For ddclient I use recipes/debian.yml@salsa-ci-team/pipeline
, which works well except for one minor annoyance: The CI pipelines run for branches where it makes no sense to run CI (upstream
in particular). It would be nice to be able to easily control which branches are tested, perhaps via an environment variable.
Implementation thoughts:
- A simple list of branch names (e.g.,
master buster bullseye
) is probably sufficient for 99% of use cases. If the environment variable is set to a non-empty string, a branch will only be tested if it is listed. If not set or set to the empty string, all branches are tested. - Alternatively, it could be a simple list of branches to ignore (e.g.,
upstream pristine-tar
). A branch is not tested if it is listed. - A list of globs would be more powerful than a simple list, but probably not worthwhile unless it is trivial to implement. (Also, we can start with a simple list and extend it to a list of globs in the future if demand arises.)
- A regex would be even more powerful than a list of globs, but less user-friendly, and the additional power is probably unnecessary.