[Buildbot-devel] Configuring multiple projects

Amy Troschinetz Amy.Troschinetz at adometry.com
Sat Jan 12 00:48:54 UTC 2013

I saw the http://trac.buildbot.net/wiki/FAQ section titled "Can I use a single buildmaster for multiple projects?" and tried to find the answer to my question on the mailing list archives, but I didn't see anything that helped. I have two mercurial repositories and all I want is for buildbot to notice when changes are pushed into either of them, and then kick off some build scripts. Relatively straight forward I hope.

I have had buildbot working for one of the repositories for a long time, and now I am just trying to add the second. I was able to get it configured so that changes to *either* of these repositories would kick off a build for *both* of them, which was bad. Changes in one repository shouldn't trigger a build in the other repository. Changes in one of the repositories only needs to kick off the build for that specific repository. But I want to be able to go to my buildbot waterfall UI and see both projects side-by-side. 

I went back to the config and made some tweaks. So now changes in either repository are being picked up correctly (I can see them in the waterfall UI), however builds aren't getting kicked off any longer. So clearly I broke something.

The following is a synopsis of the relevant parts of my master.cfg. What am I doing wrong here?

c = BuildmasterConfig = {}

from buildbot.buildslave import BuildSlave
c['slaves'] = [BuildSlave('slavename', 'pass')] # just one slave
c['slavePortnum'] = 9989

from buildbot.changes.pb import PBChangeSource
c['change_source'] = PBChangeSource() # just one change source

from buildbot.scheduler import SingleBranchScheduler
c['schedulers'] = [
        , branch='default'
        , treeStableTimer=1 # for testing
        , builderNames=['starfish-builder']
    , SingleBranchScheduler(
        , branch='default'
        , treeStableTimer=1 # for testing
        , builderNames=['services-builder']
] # two schedulers, one for each project

from buildbot.process import factory
from buildbot.steps.source import Mercurial
from buildbot.steps.shell import Configure
from buildbot.steps.shell import Compile
from buildbot.steps.shell import Test

f1 = factory.BuildFactory()
# ...
b1 = {
    'name': 'starfish-builder'
    , 'slavename': 'slavename'
    , 'builddir': 'starfish'
    , 'factory': f1

f2 = factory.BuildFactory()
# ...
b2 = {
    'name': 'services-builder'
    , 'slavename': 'slavename'
    , 'builddir': 'services'
    , 'factory': f2

c['builders'] = [b1, b2] # two builders

# ...

Also, in the .hg/hgrc for each of my two project repositories I have the following:

changegroup.buildbot = python:buildbot.changes.hgbuildbot.hook

master = buildbot.hostname:9989
branch = default

Amy Troschinetz | Senior Software Developer | o 512.852.7127 | amy.troschinetz at adometry.com
Adometry | www.adometry.com

More information about the devel mailing list