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

2 votes
Accepted answer
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
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

190 views 4 1
Join discussion

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