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

Rebuild plan branches on develop branch change

Marcin Ołdziejewski March 15, 2018

I have Bamboo Server 6.2.8 integrated with Bitbucket Cloud (bitbucket.org).

When pull request are created from feature/A and feature/B branches to develop, Bamboo creates two new branch plans. In the plan, feature branch is merged to develop first, then build and tests are performed.

The question is: how to trigger rebuild of feature/B branch plan, when pull request for feature/A is merged to develop?

This is requried to check if changing code base (develop branch) does not break other feature branches and to prevent merging them to develop (using merge checks).

bamboo (1).png

 

 

2 answers

0 votes
Marcin Gardias
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 11, 2018

There's a somewhat hacky way to do that:

- define the same repository twice and add it to the plan 2 times

- branches should only override the first definition, the 2nd should point to 'develop'. The automatic branch detection actually works this way, so no need to worry about that. Just don't override the 2nd repo manually (which is possible in 6.3.0 and later)

- in the build you check out only the first definition (obviously..., since you don't really need 'develop' checked out, just scanned for changes)

Now, change detection is going to react to changes on both branches, because now you have 2 repository definitions in your plan (even though you actually check out only the feature branch) and since one of them is always pointing to 'develop', branches will start on changes to 'develop'.

One negative side-effect is that changes to 'develop' branch will be listed twice on the plan (or plan branch) that builds 'develop' branch. Also there's going to be some performance hit, but it should not be much thanks to caching.

0 votes
Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2018

It's not implemented yet, vote for https://jira.atlassian.com/browse/BAM-12646 and watch it for future updates

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events