Make stuff to do things

Subscribe (?) Subscribe to RSS

Posts Tagged ‘ci’

GitHub and BuildBot – Continuous Integration

Published on June 17th, 2009 in Comments

GitHub and Buildbot

[UPDATE  2009-7-7: Refactored the initial Github Buildbot code]

Continuous integration is pretty damn important. When we switched to GitHub we wanted to keep using BuildBot, so I wrote this this quick and dirty script.  It’s been merged into BuildBot’s master branch.

If you have BuildBot already, you’ll find it in contrib/github_buildbot.py

The code is largely based on the code from contrib/git_buildbot.py

To run this program just call `./github_buildbot.py` or run `./github_buildbot.py &` to run in the background.

Be sure to modify the settings as necessary. You may use this service hook for as many github projects as you desire. Just set the post-receive service hook in github to the publically accessible address of the server this script runs on.  The default port is 4000.  Example service hook: http://yourserver.com:4000.

github_buildbot.py will determine the repository information from the JSON HTTP POST it receives from github.com and build the appropriate repository. If your github repository is private, you must add a ssh key to the github repository for the user who initiated github_buildbot.py

If you have a private repository, be sure to add your server’s public key to the repository on GitHub.

As of this writing, it will clone your repository in the /tmp directory.  This is exactly what I meant by quick & dirty.  If this is too insecure for you, you can change the code as necessary. If you make it better, don’t forget to share :)

I hope this helps!

Switch to our mobile site