django-buildbots icon indicating copy to clipboard operation
django-buildbots copied to clipboard

Tools and templates for maintaining Django's buildbots

Django's buildbots

Utilities for configuring and running Django's buildbot and build slaves. This is based around zc.buildout_ and the collective.buildbot_ recipe.

The master config is here mostly for others to look at for example. The useful bit is in the slave.

.. _zc.buildout: http://pypi.python.org/pypi/zc.buildout .. _collective.buildbot: http://pypi.python.org/pypi/zc.buildout

Setting up a build slave

  1. Bootstrap zc.buildout::

     cd slave/
     python bootstrap.py
    
  2. Edit slave/buildout.cfg for your environment. The version here has configs for a couple of slaves (one that tests against sqlite, and one against PostgreSQL); it's probably easier to start with just a single slave.

    See the documentation for the build slave recipe_ for more info on the build slave options.

  3. Give the slave a good, unique name that'll tell what it is and what it does (i.e. osx-10.5-python2.5-sqlite, ubuntu-hardy-python2.6-mysql-5.0, etc.)

  4. Make up a slave password.

  5. Make sure the slave environment has DJANGO_SETTINGS_MODULE and PYTHONPATH set correctly, and make sure that DJANGO_SETTINGS_MODULE exists and is configured correctly.

    Note that the same slave may test multiple branches, so you'll need to make sure that nothing's shared between the slaves. See testsettings/postgres.py for one of the things you'll need to do: set TEST_DATABASE_NAME to something that'll be different for each slave.

  6. Create the buildbot by running ./bin/buildout from the slave directory.

  7. Start the slave: ./bin/<my-slave-name> start

  8. Send the buildbot name and password to jacob -at- jacobian -dot- org to get added to the master.

  9. Watch your buildbot: if it starts failing because of problems on the server it'll get de-listed.

.. _the build slave recipe: http://pypi.python.org/pypi/collective.buildbot/0.3.3#the-build-slave-recipe