Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

CI using Bamboo for release and hotfix branches

sreekumar_menon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 3, 2014

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
Answer accepted
Caley Goff December 4, 2014
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 

EDIT: ADDING INFORMATION TO ANSWER

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.

0 votes
sreekumar_menon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 4, 2014

thanks for more details..

0 votes
sreekumar_menon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 4, 2014

Thanks Caley ,will give it a try.

Caley Goff December 4, 2014

Absolutely I added some additional comments to my original answer.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events