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.
It's not implemented yet, vote for https://jira.atlassian.com/browse/BAM-12646 and watch it for future updates
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.