You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.
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.
In the end I just went with two completely separate plans in Bamboo since this seems to be impossible to resolve in a single plan. One plan follows branches created by Pull Request. The other plan follows branches created by name regex. They are both based on common YAML files for all of the jobs and tasks, the difference between the two being the branch management.
Unfortunately now it means that developers, etc now have two different plans to follow in Bamboo.
Actually I think I am barking up completely the wrong tree here since I now realise that the branch-overrides only allow overriding the branch-config. But now from the documentation it is completely unclear what the relationship is between the main bamboo specs and any particular branch. So just what does branch-config, actually even do?
I want to provide a single bamboo spec file in master. And any time a developer creates a branch, I want that this bamboo spec already contains all the rules about what those branches should do without requiring any further action.
But nothing works.
Every single variation that I can think of usually results in either a spec that cannot be parsed, or an error that says things like
Document structure is incorrect: Found following unused properties: branch-config / create, branch-config / delete, branch-config / link-to-jira.
Every property must have a correct key recognizable by Bamboo and must be used as part of the configuration in the current YAML document. Common sources of these problems are typos in properties keys, unused jobs, and mixing a plan and its permissions configuration in one YAML document.
Surely there is some way to override the default branch behaviour based on the branch name?