Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,368
Community Members
 
Community Events
184
Community Groups

Different merging strategy for release branches in Bamboo Specs

I have been trying to create a bamboo.yaml that both creates new plan branches for pull requests and plan branches for all release/.* branches.

Is it possible to create a specification that has different integration for different plan branches?


branches:
    create:
        for-new-branch: release/.*
    delete:
        after-deleted-days: 14
        after-inactive-days: 14

 

branches: 
    createfor-pull-request
    
integration:
       
merge-from${bamboo.repository.pr.targetBranch}
        
push-on-successfalse
    link-to-jira: true
    

 

I don't want the release branches to merge with anything when built but plan branches from PRs should always be merged with the target branch.

1 answer

0 votes
Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 12, 2020

Hi Andreas

I'm looking for the same thing. Did you find any solution?

I never did. We reverted back and are not using specs anymore.

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 12, 2020

Oh ok. After digging deeper today I found Bamboo 7.1 supports branch overriding for several things including branch-config -> integration.

https://docs.atlassian.com/bamboo-specs-docs/7.1.4/specs.html?yaml#overriding-branch-settings-using-bamboo-specs

I have to update to Bamboo 7.1 so I haven't tested yet.

Did anyone get this to work? I want exactly the same thing.

Normal development branches are created by pull-request, and those have a merge strategy. But a release branch should be created just from a named branch, and it should not merge.

I have created the YAML spec from 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: 60
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: 5
link-to-jira: true

I create a branch in git matching the regex, but I still don't get any branch appearing automatically.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events