2
# ex: set syntax=python:
4
# This is a sample buildmaster config file. It must be installed as
5
# 'master.cfg' in your buildmaster's base directory.
7
# This is the dictionary that the buildmaster pays attention to. We also use
8
# a shorter alias to save typing.
9
c = BuildmasterConfig = {}
13
# The 'slaves' list defines the set of recognized buildslaves. Each element is
14
# a BuildSlave object, specifying a username and password. The same username and
15
# password must be configured on the slave.
16
from buildbot.buildslave import BuildSlave
17
c['slaves'] = [BuildSlave("example-slave", "pass")]
19
# 'slavePortnum' defines the TCP port to listen on for connections from slaves.
20
# This must match the value configured into the buildslaves (with their
22
c['slavePortnum'] = 9989
26
# the 'change_source' setting tells the buildmaster how it should find out
27
# about source code changes. Here we point to the buildbot clone of pyflakes.
29
from buildbot.changes.gitpoller import GitPoller
30
c['change_source'] = GitPoller(
31
'git://github.com/buildbot/pyflakes.git',
32
branch='master', pollinterval=1200)
36
# Configure the Schedulers, which decide how to react to incoming changes. In this
37
# case, just kick off a 'runtests' build
39
from buildbot.scheduler import Scheduler
41
c['schedulers'].append(Scheduler(name="all", branch=None,
43
builderNames=["runtests"]))
47
# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
48
# what steps, and which slaves can execute them. Note that any particular build will
49
# only take place on one slave.
51
from buildbot.process.factory import BuildFactory
52
from buildbot.steps.source import Git
53
from buildbot.steps.shell import ShellCommand
55
factory = BuildFactory()
56
# check out the source
57
factory.addStep(Git(repourl='git://github.com/buildbot/pyflakes.git', mode='copy'))
58
# run the tests (note that this will require that 'trial' is installed)
59
factory.addStep(ShellCommand(command=["trial", "pyflakes"]))
61
from buildbot.config import BuilderConfig
65
BuilderConfig(name="runtests",
66
slavenames=["example-slave"],
69
####### STATUS TARGETS
71
# 'status' is a list of Status Targets. The results of each build will be
72
# pushed to these targets. buildbot/status/*.py has a variety to choose from,
73
# including web pages, email senders, and IRC bots.
77
from buildbot.status import html
78
from buildbot.status.web import auth, authz
79
authz_cfg=authz.Authz(
80
# change any of these to True to enable; see the manual for more
82
gracefulShutdown = False,
83
forceBuild = True, # use this to test your slave once it is set up
84
forceAllBuilds = False,
87
stopAllBuilds = False,
88
cancelPendingBuild = False,
90
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
92
####### PROJECT IDENTITY
94
# the 'projectName' string will be used to describe the project that this
95
# buildbot is working on. For example, it is used as the title of the
96
# waterfall HTML page. The 'projectURL' string will be used to provide a link
97
# from buildbot HTML pages to your project's home page.
99
c['projectName'] = "Pyflakes"
100
c['projectURL'] = "http://divmod.org/trac/wiki/DivmodPyflakes"
102
# the 'buildbotURL' string should point to the location where the buildbot's
103
# internal web server (usually the html.WebStatus page) is visible. This
104
# typically uses the port number set in the Waterfall 'status' entry, but
105
# with an externally-visible host name which the buildbot cannot figure out
108
c['buildbotURL'] = "http://localhost:8010/"
112
# This specifies what database buildbot uses to store change and scheduler
113
# state. You can leave this at its default for all but the largest
115
c['db_url'] = "sqlite:///state.sqlite"