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?
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.
thanks for more details..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Caley ,will give it a try.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Absolutely I added some additional comments to my original answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.