<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=299788&amp;fmt=gif">

Atlassian Auto-Merging: Bamboo Configuration

Atlassian, Bamboo

By Thomas Behlau

After having a look at the merging features in Stash, we will take a tour thru the configuration of Bamboo with regards to its auto-merging features.

Configuration

The auto-merge configuration in Bamboo is part of the "Branches" settings page. After checking the "Branch merging enabled" options, two options will appear for choosing the desired merge functionality.

 

Branch Updater

Options one is the "Branch Updater" option. If this option is chosen, each build of the "base plan" will trigger the updater, after which the code for each branch plan will be checked out, changes from the base plan will be merged into each branch plan and the build for the branch plans will be executed. After a successful build, the code merge can be pushed back to the repository.  

The following image illustrates that behavior:


Branch Updater
The configuration of the branch updates itself is very easy. The only options you have to specify are the "base plan" (or "Merge From" in the UI) and whether or not you want commit the changes back to the repository. 

 

Branch Updater Config

 

Gatekeeper

If the Gatekeeper option is chosen for auto-merging, then the behavior is the opposite of the branch updater. In the case of the gatekeeper, each feature branch is checked out. After a successful build of the feature branch, the code of the base plan is checked out and the code change from the feature branch is merged into the base plan. The build of the base plan is executed and the merged code is optionally pushed back to the repository.

See the following picture:
Gatekeeper

 

The configuration of the Gatekeeper is straightforward. In the options panel you can configure the base plan and whether or not the merged code should be pushed back to the repository.


Gatekeeper Config
 

Build And Merge Failures

The big question when using automated features is always: "What happens if something does not work?" First let's look at build failures. If any of the builds fails in either one of the configurations, the build will be marked as failed, no merge will be executed and obviously no code merges will be pushed back to the repository. In the case of a merge failure, Bamboo will create a pull request for the failed merge. This allows a team member to take care of the issue.

 

Conclusion

Using the automated merging tools in Stash and Bamboo can show a huge benefit in your development process. No longer do you have to designate a team member to merge changes between branches to keep up with the development of other teams. You also do not have to worry about keeping up with all the releases you are maintaining. In most cases the Atlassian tools will take care of it. In the case that something does go wrong, Bamboo and Stash will create pull requests that help to diagnose and solve any problems.

Managing JIRA at Scale White Paper

TAGS: Atlassian, Bamboo

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Subscribe to Our Newsletter

Recent Blog Posts