CI using Bamboo for release and hotfix branches

In Git-flow , How does continous integration work with  release and hotfix branches. In case of develop and master branches ,it is easy to configure them since the branches are fixed. since release branches gets created dynamically , is there a way to setup CI for this branches. For example if we want to deploy all release branches builds (release1,release2...) to test servers and hotfix builds to stage servers. 

Any suggestions or pointers?


3 answers

1 accepted

Accepted Answer
2 votes
How does Bamboo Continuous Integration work with dynamic release and hotfix branches when using the git-flow process?


We let Stash tell Bamboo what changes are made to the repo. And based on the changes that are told to Bamboo, Bamboo will look at branches that meet a specific pattern. We tell Bamboo to delete the branch after a few days of activity (from its local records, not from stash).

Because we use the gitflow workflow we can use the following:

Plan Configuration > Branches
Create Plan Branch (master is the repo default) select Develop, click enable branch, and add. 
Got back to the Branches tab 
Check the box "Create plan branches for branches detected in the repository"
We use the following pattern "( release-.* | hotfix/.* | feature/.*)" 
**without quotes 
which allows for release-v1.2.3 || hotfix/corporate_needs_this_now || feature/HOD-1337-sneaky_feature_request

We tell Bamboo to delete its branches after 3 days of inactivity. Good Luck 


If you do not have stash, you can poll the git repo for changes periodically. Beware though, we observed that when Bamboo polled the repo (even in a increments of 30 second polling) it would still take 3-5 minutes until Bamboo would refresh and see the new branch in the repo. So if the branch doesn't appear immediately after push to origin wait a few minutes

Also note, that any already existing branches in the repo at the time of implementing the pattern, will not be added to Bamboo automatically. **They have to created _after_ the pattern is set in the interface**, tailing the logs with the debug mode on will reveal that Bamboo already knows the existing branches and doesn't do anything.

 You can enable DEBUG logging on com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl (in Administration/Log Settings) and tail catalina.out or - if you're using a remote build agent - the atlassian-bamboo-agent.log for troubleshooting.

Thanks Caley ,will give it a try.

Absolutely I added some additional comments to my original answer.

thanks for more details..

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

303 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you