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

Different merging strategy for release branches in Bamboo Specs

Andreas Eriksson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 31, 2020

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.
November 12, 2020

Hi Andreas

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

Andreas Eriksson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 12, 2020

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.
November 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.

jodyfanning October 20, 2021

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