example master.cfg
# This is the buildmaster config file. It must be installed as
# 'master.cfg' in your buildmaster's base directory (although the filename
# can be changed with the --basedir option to 'mktap buildbot master').
# It has one job: define a dictionary named BuildmasterConfig. This
# dictionary has a variety of keys to control different aspects of the
# buildmaster. They are documented in docs/config.xhtml .
import os.path
from buildbot.scheduler import Scheduler, Periodic
from buildbot.process import step, factory
from buildbot.status import html
from buildbot.steps.transfer import FileDownload
s = factory.s
import mozbuild
reload(mozbuild)
from mozbuild import *
CVSROOT = ":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot"
# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}
##
## Misc Config
##
c['debugPassword'] = debugPassword
c['projectName'] = "unittest"
c['projectURL'] = "http://wiki.yourproject.org/unittest"
c['buildbotURL'] = "http://localhost:8010/"
c['slavePortnum'] = 9989
##
## Slaves
##
# (bot-name, bot-password)
c['bots'] = [("linux","1h34rtL1nuX")]
##
## Status
##
c['status'] = []
c['status'].append(html.Waterfall(http_port=2005))
# c['status'].append(html.Waterfall(http_port=2005, css="/build/master/waterfall.css"))
from buildbot.status import tinderbox
c['status'].append(tinderbox.TinderboxMailNotifier(
fromaddr="unittest@yourdistro.org",
tree="Firefox",
extraRecipients=["tinderbox-daemon@tinderbox.yourproject.org"],
relayhost="smtp.yourproject.org",
logCompression="bzip2"))
##
## Sources
##
from buildbot.changes import bonsaipoller
c['sources'] = []
c['sources'].append(bonsaipoller.BonsaiPoller(
bonsaiURL = "http://bonsai.mozilla.org",
module = "PhoenixTinderbox",
branch = "HEAD",
pollInterval = 1 * 60))
##
## Schedulers
##
c['schedulers'] = []
c['schedulers'].append(Scheduler(name="bonsai build scheduler",
branch="HEAD",
treeStableTimer=5*60,
builderNames=["Linux dep unit test"]))
c['schedulers'].append(Periodic(name="9 hour build scheduler",
builderNames=["Linux dep unit test"],
periodicBuildTimer=9*60*60))
# the 'builders' list defines the Builders. Each one is configured with a
# dictionary, using the following keys:
# name (required): the name used to describe this bilder
# slavename (required): which slave to use, must appear in c['bots']
# builddir (required): which subdirectory to run the builder in
# factory (required): a BuildFactory to define how the build is run
# periodicBuildTime (optional): if set, force a build every N seconds
builders = []
# linux
linuxFactory = factory.BuildFactory()
linuxFactory.addStep(MozillaCheckoutClientMk,
workdir=".",
cvsroot=CVSROOT)
linuxFactory.addStep(FileDownload, mastersrc="mozconfig-places",
slavedest=".mozconfig",
workdir="mozilla")
linuxFactory.addStep(step.ShellCommand, name="mozconfig contents",
command=["cat",".mozconfig"],
workdir="mozilla")
linuxFactory.addStep(step.Compile, name="checkout",
description=["checking out"],
descriptionDone = ["checkout"],
command=["make","-f","client.mk","checkout"],
workdir='mozilla')
linuxFactory.addStep(step.Compile,
command=["make", "-f", "client.mk", "build"],
workdir='mozilla')
linuxFactory.addStep(MozillaCheck,
warnOnWarnings=True,
timeout=60*40,
workdir="mozilla/objdir")
linuxFactory.addStep(CreateProfile,
warnOnWarnings=True,
workdir=".",
env=MozillaEnvironments['centos'],
clobber=True)
linuxFactory.addStep(MozillaUnixReftest, warnOnWarnings=True,
workdir="mozilla/layout/reftests",
env=MozillaEnvironments['centos'])
linuxFactory.addStep(MozillaUnixCrashtest, warnOnWarnings=True,
workdir="mozilla/testing/crashtest",
env=MozillaEnvironments['centos'])
linuxFactory.addStep(MozillaMochitest, warnOnWarnings=True,
workdir="mozilla/objdir/_tests/testing/mochitest",
env=MozillaEnvironments['centos'])
linuxFactory.addStep(MozillaMochichrome, warnOnWarnings=True,
workdir="mozilla/objdir/_tests/testing/mochitest",
env=MozillaEnvironments['centos'])
linuxFactory.addStep(MozillaBrowserChromeTest, warnOnWarnings=True,
workdir="mozilla/objdir/_tests/testing/mochitest",
env=MozillaEnvironments['centos'])
firefox_trunk_centos5_builder = {
'name': "Linux dep unit test",
'slavenames': ['linux'],
'builddir': "linux",
'factory': linuxFactory,
'category': "Firefox"}
c['builders'] = builders