Buildbot HOWTO
Updated 12/06/09
About:
Buildbot is a system for testing software across platforms. When new SVN commits are added, it automatically checks out the new code on each registered slave machine and attempts to build the software. This helps ensure fixing one thing doesn't break another, and so on. Linbox's buildbot status page can be seen at http://hmrg.pc.cis.udel.edu:8010.
Here are the basics you need to get a buildbot slave up and running. First, you need to install package Buildbot (which relies on package Twisted). Many distributions package buildbot for you. The README file within Buildbot's main directory serves as an excellent guide if you have to build from source.
To check things went smoothly, try:
buildbot --version
If it shows the versions of Buildbot and Twisted, everything is OK and ready for slave creation.
Setting up the slave:
Four things need to be synchronized with the buildbot master:
- your slave's name
- the password assigned to your slave
- the hostname and port number of the buildmaster (!hmrg.pc.cis.udel.edu, 9989)
- (Optional) special commands to install Linbox on your particular buildslave. The typical setup will run "autogen.sh", "make", and "make test" from linbox's main directory. Let Linbox's buildbot admin know if Linbox dependencies are installed in atpyical locations, or if you want any other commands executed. Refer to the attached Makefile below if your buildslave needs to set environment variables.
Name your slave something indicating its relevant feature(s) (e.g. OS, compiler, etc). Next, create a working directory on your machine for the buildslave. This is essentially a sandbox where an SVN copy of Linbox will be checked out and built. This should be separate from your working or development Linbox directory, of course, to avoid overwriting any work you have outstanding. Finally, after settling on the SLAVENAME and PASSWORD with the Linbox buildbot admins (through e-mail with Dave Saunders), run the command:
buildbot create-slave WORKDIR MASTERHOST:PORT SLAVENAME PASSWORD
Finally, to start your slave for real, run the command:
buildbot start WORKDIR
You might want to use this in a startup script to run each time your machine is booted, or as a cron job. For more info see the Buildbot Manual.
Attachments
-
Makefile
(348 bytes) - added by youse
9 months ago.
Simple Makefile to start/stop buildslave
-
Makefile.special_environment
(0.7 kB) - added by youse
9 months ago.
Makefile displaying how to set a custom environment for the build slave
