Working with branch divergence

Still need help?

The Atlassian Community is here for you.

Ask the community

Starting from version 7.0, Bamboo allows for creating divergent branches with custom configuration that differs from that on the master branch.

Bamboo 7.0 allows for branch divergence only for Bitbucket Server.

Branches are commonly used in version control systems to develop features or bug fixes without affecting your main branch also known as master branch, or master for short. So far, in Bamboo, the configuration of your master was carried over to your branch and any additional, custom configuration on a branch differing from that of a master was ignored by Bamboo.

Starting from version 7.0, Bamboo allows for creating branches with custom configuration that differs from that on master branch. Such branches are called diverging branches. Branch divergence allows you to create custom building plans with Bamboo Specs, and configuration for features branches which will be different from that on a master branch. 

Using a single master branch with multiple people making commits can create clutter. The master branch can carry a release candidate, be critical for the project, or just work slowly. Branch divergence allows you to create your own feature configuration separate from master, where you can make your commits, test Bamboo Specs without having to worry about the master brach


Prerequisites for allowing branch divergence in Bamboo

  • Your code must be stored in Bitbucket Server.

  • Bamboo must be integrated with Bitbucket Server.

  • In Bamboo, your Project must be configured as linked repository of the Bitbucket type.

  • Bamboo Specs must be stored in the same repository, under the bamboo-specs folder.

  • Bamboo must have plan branch detection enabled (it’s on by default in Bamboo).


How to use divergent branches?

I already have plans managed by Bamboo Specs stored in a repository...

That’s great! Make sure that you are using Bitbucket Server repository type as other types are not supported yet for divergent branches.

To start using divergent branches just change your specs in the bamboo-specs directory on your branch (it can be either Java or YAML specs) and push your changes!

I manage plans through Bamboo UI...

Consider storing your build plan configuration as code for easier automation, change tracking, validation, and much more. This is the way to best way to create your configuration of divergent branches. We called this feature Bamboo Specs and you can read more about it here.

Know limitations and changes to previous behavior of Bamboo

  • Branch divergence is not available for deployment projects. Bamboo ignores any Bamboo Specs on deployment projects in divergent branches.

  • The Other tab is not available in the plan configuration screen for divergent branches. 

  • When using divergent branches, you can’t link any repositories additional to those on master branch. You can change the configuration of that repository but you can’t add or remove it.

  • To create a new plan on your divergent branch, you must first create it on master.

  • Default settings from Automatic branch detection configuration, like triggers and notification settings, are ignored by divergent branches.

  • The default repository of a divergent branch is inherited from the master branch and it’s not possible to select a different repository on your divergent branch.

Last modified on Dec 15, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.