I asked this under https://community.atlassian.com/t5/Bamboo-questions/Different-merging-strategy-for-release-branches-in-Bamboo-Specs/qaq-p/1469251, but didn't get any answer, so I'll ask this again as a specific question.
How can I define an override for branches so that specifically name branches get a different branch plan creation/merge strategy than the default?
I have a generic plan in Bamboo Yaml specs with normal development branches being created by pull-request with a specific merge strategy that is used for running tests. But we also have release branches that are branched periodically and track a production release. These release branches are created as a specifically named branch and never merge to master. I would like Bamboo to automatically create branch plans for these as well and to run the tests, only without the merge to master. If this was a manual Bamboo job then I could live with the default option, and someone can manually create a new release branch with different merge strategy.
Now that we have Yaml specs we cannot continue with this manual process for release branches given that having a spec disables creating branch plans.
I see that I can have branch overrides, and I have implemented that according to how I understand it should be, but it doesn't do anything.
branches:
create: for-pull-request
delete:
after-deleted-days: 0
after-inactive-days: 10
integration:
push-on-success: false
merge-from: core-build
link-to-jira: true
branch-overrides:
-
^test_.*$:
branch-config:
create:
for-new-branch: ^test_.*$
delete:
after-deleted-days: 0
after-inactive-days: 10
link-to-jira: true
I create a branch in git matching the regex (i.e test_mybranch), but I still don't get any branch appearing automatically. The only branches that appear are those coming from pull-requests.