Those of you that followed Cheesecake buildbot may have noticed its strange behavior. Tests, that we knew should pass, failed with strange errors and the buidbot itself hang from time to time. I must confess it was my fault. Problems were caused by misconfiguration – I tried to run two instances of nose test runners at the same time. That way one instance of test get into way of another one and we were getting errors similar to:

OSError: [Errno 2] No such file or directory:
'/tmp/cheesecake_sandbox/nose-0.8.3.log'

First Cheesecake instance have created this file, but another one cleaned up global /tmp directory, thus the error. To fix this you have to run builds independently, one after another. At first, I used Periodic again, configuring it like this:

But it won’t do what I wanted, not counting the first time. First object will run x86_rh9_trunk build every 6 hours and 10 minutes, second will run x86_rh9_mk build every 6 hours. That means that the interval between these two build will rise in time. First it will be 10 minutes, then 20 minutes, then half an hours, etc. That’s not really what I wanted. Searching a buildbot mailing list I’ve found a thread about a cron-style scheduler, that is capable of running builds at certain points in time. Implementation of this scheduler was merged into main buildbot development line with a name Nightly. I was happy to see that it was finally the module I was looking for. My configuration looks like this:

It will run x86_rh9_mk build at 9.00am, 3.00pm, 9.00pm and 3.00am (so every 6 hours) and x86_rh9_trunk build at 9.10am, 3.10pm, 9.10pm and 3.10am (so every 6 hours, always 10 minutes later than x86_rh9_mk). buildbot seems to be configured much better now, so I can focus on coding exclusively.

I must admin setting up a buildbot was very entertaining. Of course this is because I read Grig tutorial. With well-written HOWTO nothing is hard. I’ll just write down few things that wasn’t already mentioned by Grig.

After that I could try my luck again with setup.py install. Installation was successfull this time. Next prerequisite is Twisted and TwistedWeb packages. I’ve downloaded a TwistedSumo tarball and installed Twisted-2.2.0 and TwistedWeb-0.5.0 with the help of almighty setup.py install command.

Installing last package is pretty easy. You just have to execute one command:

If you have any problems with easy_install (it may throw error Not a recognized archive type at you on some systems) you may also download, unpack and install the package manually. easy_install just automates this process.

Builbot 0.7.3 was realeased this Tuesday. You can grab any version at sourceforge. Install with standard python setup.py install. You should get buildbot in /usr/bin/ installed.

buildmaster

To set up a buildmaster few steps have to be followed. First create a separate user:

Note that the port given here and c[‘slavePortnum’] in master configuration must match.

running

To start a build slave, run following command as user buildslave:

buildbot start /home/buildslave/conf

Then start a build master with simillar command (run as user buildmaster):

buildbot start /home/buildmaster/conf

That’s it! You can now access your buildbot through web interface at an address you’ve specified in c[‘buildbotURL’] configuration option. If this doesn’t work check out logs (twistd.log) in your slave and master directories.