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 (although the filename
6 # can be changed with the --basedir option to 'mktap buildbot master').
8 # It has one job: define a dictionary named BuildmasterConfig. This
9 # dictionary has a variety of keys to control different aspects of the
10 # buildmaster. They are documented in docs/config.xhtml .
13 # This is the dictionary that the buildmaster pays attention to. We also use
14 # a shorter alias to save typing.
15 c = BuildmasterConfig = {}
19 # the 'slaves' list defines the set of allowable buildslaves. Each element is
20 # a tuple of bot-name and bot-password. These correspond to values given to
21 # the buildslave's mktap invocation.
22 from buildbot.buildslave import BuildSlave
24 BuildSlave("linux", "***"),
25 BuildSlave("win32", "***")
29 # to limit to two concurrent builds on a slave, use
30 # c['slaves'] = [BuildSlave("bot1name", "bot1passwd", max_builds=2)]
33 # 'slavePortnum' defines the TCP port to listen on. This must match the value
34 # configured into the buildslaves (with their --master option)
36 c['slavePortnum'] = 0000
40 # the 'change_source' setting tells the buildmaster how it should find out
41 # about source code changes. Any class which implements IChangeSource can be
42 # put here: there are several in buildbot/changes/*.py to choose from.
44 from buildbot.changes.pb import PBChangeSource
45 c['change_source'] = PBChangeSource()
47 # For example, if you had CVSToys installed on your repository, and your
48 # CVSROOT/freshcfg file had an entry like this:
49 #pb = ConfigurationSet([
50 # (None, None, None, PBService(userpass=('foo', 'bar'), port=4519)),
53 # then you could use the following buildmaster Change Source to subscribe to
54 # the FreshCVS daemon and be notified on every commit:
56 #from buildbot.changes.freshcvs import FreshCVSSource
57 #fc_source = FreshCVSSource("cvs.example.com", 4519, "foo", "bar")
58 #c['change_source'] = fc_source
60 # or, use a PBChangeSource, and then have your repository's commit script run
61 # 'buildbot sendchange', or use contrib/svn_buildbot.py, or
62 # contrib/arch_buildbot.py :
64 #from buildbot.changes.pb import PBChangeSource
65 #c['change_source'] = PBChangeSource()
70 ## configure the Schedulers
72 from buildbot.scheduler import Scheduler
74 schedTrunk = Scheduler(
77 treeStableTimer = 1*60,
78 builderNames = ["linux-trunk", "win32-trunk"]
80 schedStable = Scheduler(
82 branch = "branches/sourcemod-1.0.x",
83 treeStableTimer = 1*60,
84 builderNames = ["linux-stable", "win32-stable"]
87 c['schedulers'] = [schedStable, schedTrunk]
92 # the 'builders' list defines the Builders. Each one is configured with a
93 # dictionary, using the following keys:
94 # name (required): the name used to describe this bilder
95 # slavename (required): which slave to use, must appear in c['bots']
96 # builddir (required): which subdirectory to run the builder in
97 # factory (required): a BuildFactory to define how the build is run
98 # periodicBuildTime (optional): if set, force a build every N seconds
100 # buildbot/process/factory.py provides several BuildFactory classes you can
101 # start with, which implement build processes for common targets (GNU
102 # autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the
103 # base class, and is configured with a series of BuildSteps. When the build
104 # is run, the appropriate buildslave is told to execute each Step in turn.
106 # the first BuildStep is typically responsible for obtaining a copy of the
107 # sources. There are source-obtaining Steps in buildbot/steps/source.py for
108 # CVS, SVN, and others.
110 from buildbot.process import factory
111 from buildbot.steps.shell import Compile
112 from buildbot.steps.shell import ShellCommand
113 from buildbot.steps.transfer import FileDownload
114 from buildbot.steps.source import SVN
115 from buildbot.process.properties import WithProperties
116 from buildbot.steps.python_twisted import Trial
117 from buildbot import locks
119 pdb_lock = locks.MasterLock("symbolstore")
121 def create_factory(sep, os):
122 f1 = factory.BuildFactory()
123 f1.addStep(SVN(baseURL = "svn://svn.alliedmods.net/am/sourcemod/",
127 f1.addStep(ShellCommand(
130 command = ["tools" + sep + "buildbot" + sep + "bootstrap.pl"],
131 description = "bootstrapping",
132 descriptionDone = "bootstrapped"
134 f1.addStep(ShellCommand(
137 command = ["tools" + sep + "buildbot" + sep + "startbuild.pl"],
138 description = "compiling",
139 descriptionDone = "compiled"
141 f1.addStep(ShellCommand(
144 command = ["tools" + sep + "buildbot" + sep + "package.pl",
145 ".." + sep + ".." + sep + "smdrop_info"
147 description = "packaging",
148 descriptionDone = "uploaded"
151 f1.addStep(ShellCommand(
155 command = ["tools" + sep + "buildbot" + sep + "symstore.pl"],
156 description = "symstore",
157 descriptionDone = "symstore"
161 facWin = create_factory("\\", "win32")
162 facLinux = create_factory("/", "linux")
165 'name': 'linux-stable',
166 'slavename': 'linux',
167 'builddir': 'linux-stable',
171 'name': "linux-trunk",
172 'slavename': "linux",
173 'builddir': "linux-trunk",
176 buildWindowsStable = {
177 'name': 'win32-stable',
178 'slavename': 'win32',
179 'builddir': 'win32-stable',
182 buildWindowsTrunk = {
183 'name': "win32-trunk",
184 'slavename': "win32",
185 'builddir': "win32-trunk",
188 c['builders'] = [buildLinuxTrunk, buildWindowsTrunk, buildLinuxStable, buildWindowsStable]
191 ####### STATUS TARGETS
193 # 'status' is a list of Status Targets. The results of each build will be
194 # pushed to these targets. buildbot/status/*.py has a variety to choose from,
195 # including web pages, email senders, and IRC bots.
199 from buildbot.status import html
200 c['status'].append(html.WebStatus(http_port=8010))
202 # from buildbot.status import mail
203 # c['status'].append(mail.MailNotifier(fromaddr="buildbot@localhost",
205 # sendToInterestedUsers=False))
207 # from buildbot.status import words
208 # c['status'].append(words.IRC(host="irc.example.com", nick="bb",
209 # channels=["#example"]))
211 # from buildbot.status import client
212 # c['status'].append(client.PBListener(9988))
215 ####### DEBUGGING OPTIONS
217 # if you set 'debugPassword', then you can connect to the buildmaster with
218 # the diagnostic tool in contrib/debugclient.py . From this tool, you can
219 # manually force builds and inject changes, which may be useful for testing
220 # your buildmaster without actually commiting changes to your repository (or
221 # before you have a functioning 'sources' set up). The debug tool uses the
222 # same port number as the slaves do: 'slavePortnum'.
224 #c['debugPassword'] = "debugpassword"
226 # if you set 'manhole', you can ssh into the buildmaster and get an
227 # interactive python shell, which may be useful for debugging buildbot
228 # internals. It is probably only useful for buildbot developers. You can also
229 # use an authorized_keys file, or plain telnet.
230 #from buildbot import manhole
231 #c['manhole'] = manhole.PasswordManhole("tcp:9999:interface=127.0.0.1",
232 # "admin", "password")
235 ####### PROJECT IDENTITY
237 # the 'projectName' string will be used to describe the project that this
238 # buildbot is working on. For example, it is used as the title of the
239 # waterfall HTML page. The 'projectURL' string will be used to provide a link
240 # from buildbot HTML pages to your project's home page.
242 c['projectName'] = "SourceMod"
243 c['projectURL'] = "http://www.sourcemod.net/"
245 # the 'buildbotURL' string should point to the location where the buildbot's
246 # internal web server (usually the html.Waterfall page) is visible. This
247 # typically uses the port number set in the Waterfall 'status' entry, but
248 # with an externally-visible host name which the buildbot cannot figure out
251 c['buildbotURL'] = "http://localhost:8010/"