How can I monitor automatic branch detection in bamboo?
Asked by benson margulies:

I've configured automatic branch detection. I've pushed to a branch. I think I've waited 5 minutes and not seen anything. Is there a way to see a log?

For that matter, will it notice a mere push to an existing branch, or does it need to be a whole new branch?


Answers:
author: Przemek Bruski
body: It has to be a new branch. You have to create your existing branches manually in Bamboo UI.

comments: author: benson margulies
body: Well, the auto-detector has yet to auto-detect a branch in git, even a new one. Can you help me diagnose this?


author: Caley Goff
body: I too am having issues with Bamboo not detecting new branches as they are added to the repository. Where can I look for errors about this? I have been tailing the catalina.out log and nothing stands out there.


author: Przemek Bruski
body: You can enable DEBUG logging on com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl (in Administration/Log Settings)

comments: author: Caley Goff
body: Thank you for the prompt reply. So it appears that both legacy plans and newly created plans are detecting properly. I can tell that for testing purposes Bamboo did notice my new branch in the repo. However it spit out this error saying that the branch it detected did not match my given pattern. Which is confusing because under the branches tab in the plan my pattern is the following: a_release-\*

Any ideas?

2014-01-31 11:45:04,738 DEBUG \[5-BranchDetectionBackgroundThread:pool-9-thread-1\] \[BranchDetectionServiceImpl\] VCS branch VCS Branch \[a_release-1.0.0\] is known to Bamboo. No action will be taken.

2014-01-31 11:45:04,738 DEBUG \[5-BranchDetectionBackgroundThread:pool-9-thread-1\] \[BranchDetectionServiceImpl\] VCS Branch 'VCS Branch \[a_release-1.0.2\]' does not match the given pattern. It will not be created.

2014-01-31 11:45:04,754 DEBUG \[5-BranchDetectionBackgroundThread:pool-9-thread-1\] \[BranchDetectionServiceImpl\] Finished detecting branches for plan GAT-GBIL


author: Przemek Bruski
body: That pattern is a regular expression, not a wildcard. So, your pattern would match:

a_release

a_release-

a_release--

a_release----------

etc.

Try defining the pattern as a_release-.\*


author: Caley Goff
body: Outstanding thank you for the reply! That works!!! Thank you!


author: Caley Goff
body: I should also add we are using 5.6.1


author: Kevin O_Neal
body: The bamboo documentation states that it supports prefixes as well. But, I had problems using the documented prefix method.
> If you use a naming convention where all branches that you want tested start with "feature-\*", for example, then Bamboo can be configured to only create plan branches that match that prefix. (You can use regular expressions in these configs, too).

<https://www.atlassian.com/continuous-delivery/building-feature-branches-with-bamboo>  


author: Caley Goff
body: Alright gentlemen I've tried with projects copied from various versions older than Bamboo5.0. In addition to out making a new project in the new Bamboo5.3. For some reason I cannot get Bamboo to automactically detect the creation of a new branch. I instead have to go in and configure it manually. Is there a logger I can turn on, and get some useful information to help troubleshoot this?

Thanks


author: Costin Radu
body: Well, this one happens to us as well.  
We have a big project with around 30 plans.  
The source code is kept in git (managed by stash)  
On a given release, we automatically create a release branch.   
Out of 30 plans (configured the same - all were created by cloning the first one) only 4 have automatically detected the release branch.

For all other, it seems I have to go to each plan and add the new branch from git to bamboo as well.

Are there any logs we can look for ?  
Is there a way to force the auto-detect to run on all plans in a given project ?  
(The option shown in [](/questions/79017/is-it-possible-to-force-a-run-of-the-bamboo-automatic-branch-detection)<https://answers.atlassian.com/questions/79017/is-it-possible-to-force-a-run-of-the-bamboo-automatic-branch-detection> ) does not seem to work properly.

comments: author: Caley Goff
body: I would like to add that I too also created many plans that were cloned off off a previous one. I haven't tried with a manually created plan, as the need for auto branch detection on these repo's are not there at present. I wonder if the fact that these plans were cloned off an older parent plan at sometime could be an indicator to the start of the issue?


author: Aaron Fay
body: I'm noticing this as well with Bamboo OnDemand. If I click the "Add Branch" button under branches, I can see the branch there, and then suddenly it builds. But new branches on a cloned plan don't ever get picked up. I am going to try a fresh plan now and see if that works.


Tags: bamboo-administration