Skip to content
andypols edited this page Dec 29, 2010 · 40 revisions

Installing

Copy the git-repository jar to the $BAMBOO_INSTALL_DIR/webapp/WEB-INF/lib directory.

Building a GitHub project

GitHub uses public-key cryptography and SSH to authenticate your repository. Create a readonly deployment key so that Bamboo can access the repository (http://github.com/guides/providing-your-ssh-key).

Run exec ssh-agent bash and ssh-add your-deployment-key before running Bamboo. Bamboo will use the key stored in the agent to fetch the changes from GitHub.

Fire up Bamboo and create a new Project Plan.

The plugin adds the “Git” option to the repository dropdown:

You enter the git respository URL and branch.

Select the “Repository triggers the build when changes are committed” build stratergy. This tells Bamboo that GitHub (via a GitHub service hook) will trigger the build whenever someone commits changes to the repository.

NOTE: The trigger on change feature has stopped working since github moved from the http://www.engineyard.com/ to rackspace. Bamboo’s TriggerRemoteBuild class checks that the IP address of the source repository matches the IP adress of the build trigger. The trigger now comes from a different IP and is rejected by Bamboo. I have raised the following jira with the bamboo team: BAM-4713
The work around is to poll the repository for changes.

Next, add a GitHub service hook to trigger the build. Go to the repository’s Service Hook page and enter a Bamboo updateAndBuild request. The bamboo updateAndBuild request looks like this http://your.bamboo.com/api/rest/updateAndBuild.action?buildKey=YOUR-BUILD-KEY.

Link Changes Back to GitHub

Edit the Bamboo Plan. Select the Repository Tab; choose the “GitHub Web Repository” and enter the repository url.

Now, when you view the build change set, bamboo provides a link back to the github checkin:

This link takes you to the GitHub commit page showing the changes:

Check out the plugin on the Atlassian plugin exchange

Clone this wiki locally