-
Type:
Suggestion
-
Resolution: Unresolved
-
Component/s: Pipelines - Run Failures
-
3
Branch matching with glob patterns is not sufficient. We end up having to write out the same code multiple times to cover all of our branches. Moving this into a script is an option, but there is a lot of value in keeping these configurations simple and all in one file.
Here is an example pipelines file with this issue:
#!yaml
image: phpunit/phpunit:5.0.3
clone:
depth: 1
pipelines:
branches:
master:
- step:
script:
- do something
- do something else
- do something else
develop:
- step:
script:
- do something
- do something else
- do something else
release/*:
- step:
script:
- do something
- do something else
- do something else
And the same script with regular expressions:
#!yaml
image: phpunit/phpunit:5.0.3
clone:
depth: 1
pipelines:
branches:
~ ^develop|master|release/.*$:
- step:
script:
- do something
- do something else
- do something else