in GitHub Bamboo ~ read.

Updating GitHub Status from Bamboo

GitHub has a great Statuses API. This gives you a great way to update the information from your automated build process. Giving you a quick overview of the status of a branch.

At Dotsub we use Bamboo to build our applications. Bamboo does not have a native GitHub integration so we had to create our own.

We wanted to ensure that our unit tests, findbugs report and checkstyle reports were reflected in the GitHub branch status.

This is pretty simple to set up. We'll use two small scripts and cURL. First let's add a Script task at the start of our build. This will update the branch status so we know it's building.

Add this task at the very start of the build.
Start Task

The script looks like this:

This updates GitHub and shows that branches status as 'building'.

Build in Progress

Now all we have to do is update the build at the end as well. We will use grep to count the errors in the reports. This was we can include this on the branch details.

This updates GitHub will the status and the number of each type of error. You instantly know the status/mergeability of any branch in your repository.
Branch Status

There you have it. A quick and simple way to set up Bamboo to update GitHub with build statuses. Your team will always know the status of every branch in your repo.