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

Bamboo service in github isn't triggering plan branches on commits

Tim Stokes April 27, 2015

I'm using the Bamboo service in GitHub to trigger my Bamboo plan.

When I create a new branch in github bamboo creates a new branch in my plan (perfect)

But changes in the branch on github seem to triggering the main build rather than build against the new branch in Bamboo.

Does this only work with polling? 

3 answers

0 votes
Tim Stokes April 28, 2015

Actually I found a way to do it but it needs to be set up on GitHub side manually per branch....GitHub-Bamboo.png

Using the "Bamboo Service" integration on GitHub rather than a raw webhook you can use the following pattern...
"master:ADOMATIC-BUILD,uat:ADOMATIC-BUILD4" See attached screenshot..
Where master and uat refer to the gitub branch names as well as ADOMATIC-BUILD and ADOMATIC-BUILD4 refering to the bamboo buildkey for the main and uat branches in bamboo. 
NOTE: The ADOMATIC-BUILD4 buildkey was chosen for me by bamboo for my branch, I can't see where to set this but I can find it out form the URL of bamboo, and I can use it to update the config in github.
Unfortunately the setup is manual so even though the "Bamboo Service" in GitHub creates a new branch in bamboo using a hook (nice), builds on that branch using a hook require an extra, manually added, bit in the GitHub config to identify the <github-branch>:<bamboo-build-key> mapping.
A complete solution would be for Bamboo to simply use the branch name as a composite build key for each branch such as:  ADOMATIC-BUILD-uat 
...where ADOMATIC-BUILD is the main build key for the plan and 'uat' is the branch name from source control. This would naturally provide a unique key to bamboo as well as enough semantic information to trigger the correct build from a hook.
From there it would be easy to have the "Bamboo Service" plugin for github know how to construct the correct full buildkey from the provided base key for the plan and the branch related to the commit. All it would take then is an additional checkbox on the github "Bamboo Service" plugin side asking if branch plans are used on this bamboo plan.
Hope this is helpful.
Ian Vaughan May 18, 2015

password field, sad!

0 votes
Bruno Rosa
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 28, 2015

Tim, it seems that the answer to "Does this only work with polling?" is yes. Currently, it's not possible to use the Remote Trigger (Repository triggers the build when changes are committed) when using GitHub. This is a bug and it's currently being tracked here: https://jira.atlassian.com/browse/BAM-15337.

0 votes
rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 28, 2015

Hello Tim,

Thank you for your question.

Could you please let us know if you have a webhook set up in your GitHub repository.

If so, could you inform the webhook set up?

Kind regards,
Rafael P. Sperafico
Atlassian Support

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events