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).
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.
G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events