2 # vim: set syntax=python:et:ts=4:sw=4:
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
18 BuildSlave("opensrf-slave", "XXX", max_builds=1),
19 BuildSlave("eg-slave", "XXX", max_builds=1),
20 BuildSlave("eg-u804", "XXX", max_builds=1),
21 BuildSlave("eg-u1004", "XXX", max_builds=1)
24 # 'slavePortnum' defines the TCP port to listen on for connections from slaves.
25 # This must match the value configured into the buildslaves (with their
27 c['slavePortnum'] = XXX
31 # the 'change_source' setting tells the buildmaster how it should find out
32 # about source code changes. Here we point to OpenSRF:
33 def split_file_branches_trunk(path):
34 pieces = path.split('/')
35 if pieces[0] == 'trunk':
36 return ('trunk', '/'.join(pieces[1:]))
37 elif pieces[0] == 'branches':
38 return ('/'.join(pieces[0:2]),
43 from buildbot.changes import svnpoller
44 c['change_source'] = (
47 svnurl='svn://svn.open-ils.org/OpenSRF',
48 split_file=svnpoller.split_file_branches,
52 svnurl='svn://svn.open-ils.org/ILS',
53 split_file=svnpoller.split_file_branches,
58 from buildbot.schedulers.filter import ChangeFilter
59 trunk_filter = ChangeFilter(project='OpenSRF', branch=None)
60 rel_1_6_filter = ChangeFilter(project='OpenSRF', branch="branches/rel_1_6")
61 rel_2_0_filter = ChangeFilter(project='OpenSRF', branch="branches/rel_2_0")
62 eg_rel_1_6_1_filter = ChangeFilter(project='Evergreen', branch="branches/rel_1_6_1")
63 eg_rel_2_0_filter = ChangeFilter(project='Evergreen', branch="branches/rel_2_0")
64 eg_rel_2_1_filter = ChangeFilter(project='Evergreen', branch="branches/rel_2_1")
65 eg_trunk_filter = ChangeFilter(project='Evergreen', branch=None)
69 # Configure the Schedulers, which decide how to react to incoming changes. In this
70 # case, just kick off a 'runtests' build
72 from buildbot.scheduler import Scheduler
74 c['schedulers'].append(Scheduler(name="osrf-trunk-full",
76 change_filter=trunk_filter,
77 builderNames=["osrf-trunk-ubuntu-10.04-x86_64"]))
79 c['schedulers'].append(Scheduler(name="osrf-rel_1_6",
81 change_filter=rel_1_6_filter,
82 builderNames=["osrf-rel_1_6-ubuntu-10.04-x86_64"]))
84 c['schedulers'].append(Scheduler(name="osrf-rel_2_0",
86 change_filter=rel_2_0_filter,
87 builderNames=["osrf-rel_2_0-ubuntu-10.04-x86_64"]))
89 c['schedulers'].append(Scheduler(name="evergreen-rel_1_6_1",
91 change_filter=eg_rel_1_6_1_filter,
93 "evergreen-rel_1_6_1-debian-6.00-x86_64",
94 "evergreen-rel_1_6_1-ubuntu-8.04-x86",
95 "evergreen-rel_1_6_1-ubuntu-10.04-x86"
98 c['schedulers'].append(Scheduler(name="evergreen-rel_2_0",
100 change_filter=eg_rel_2_0_filter,
102 "evergreen-rel_2_0-debian-6.00-x86_64",
103 "evergreen-rel_2_0-ubuntu-8.04-x86",
104 "evergreen-rel_2_0-ubuntu-10.04-x86"
107 c['schedulers'].append(Scheduler(name="evergreen-rel_2_1",
109 change_filter=eg_rel_2_1_filter,
111 "evergreen-rel_2_1-debian-6.00-x86_64",
112 "evergreen-rel_2_1-ubuntu-8.04-x86",
113 "evergreen-rel_2_1-ubuntu-10.04-x86"
116 c['schedulers'].append(Scheduler(name="evergreen-trunk",
118 change_filter=eg_trunk_filter,
120 "evergreen-trunk-debian-6.00-x86_64",
121 "evergreen-trunk-ubuntu-8.04-x86",
122 "evergreen-trunk-ubuntu-10.04-x86"
127 # The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
128 # what steps, and which slaves can execute them. Note that any particular build will
129 # only take place on one slave.
131 from buildbot.process.factory import BuildFactory
132 from buildbot.steps import source
133 from buildbot.steps import shell
134 from buildbot.steps import python
135 from buildbot.steps import python_twisted
137 osrf_factory = BuildFactory()
138 # check out the source
139 osrf_factory.addStep(source.SVN(
140 baseURL='svn://svn.open-ils.org/OpenSRF/',
141 defaultBranch='trunk',
145 osrf_factory.addStep(shell.ShellCommand(command=["./autogen.sh"]))
147 # configure (default args for now)
148 osrf_factory.addStep(shell.Configure())
151 osrf_factory.addStep(shell.Compile(command=["make"]))
153 # run the Perl unit tests
154 osrf_factory.addStep(shell.PerlModuleTest(workdir="build/src/perl"))
156 # run the Python unit tests (available after rel_1_6)
157 def has_python_unit_test(step):
158 return step.build.getProperty('branch') != 'branches/rel_1_6'
160 osrf_factory.addStep(python_twisted.Trial(
161 doStepIf=has_python_unit_test,
163 tests="src/python/tests/json_test.py"))
165 # report on the Python code
166 osrf_factory.addStep(python.PyLint(
167 env={"PYTHONPATH": ["src/python"]},
168 flunkOnFailure=False,
170 "--output-format=parseable",
171 "src/python/opensrf.py",
172 "src/python/osrf/app.py",
173 "src/python/osrf/cache.py",
174 "src/python/osrf/conf.py",
175 "src/python/osrf/const.py",
176 "src/python/osrf/ex.py",
177 "src/python/osrf/gateway.py",
178 "src/python/osrf/http_translator.py",
179 "src/python/osrf/json.py",
180 "src/python/osrf/log.py",
181 "src/python/osrf/net_obj.py",
182 "src/python/osrf/net.py",
183 "src/python/osrf/server.py",
184 "src/python/osrf/ses.py",
185 "src/python/osrf/set.py",
186 "src/python/osrf/stack.py",
187 "src/python/osrf/system.py",
188 "src/python/osrf/xml_obj.py",
189 "src/python/osrf/apps/example.py"]))
191 eg_factory = BuildFactory()
192 # check out the source
193 eg_factory.addStep(source.SVN(
194 baseURL='svn://svn.open-ils.org/ILS/',
195 defaultBranch='trunk',
199 eg_factory.addStep(shell.ShellCommand(command=["./autogen.sh"]))
201 # configure (default args for now)
202 eg_factory.addStep(shell.Configure())
205 eg_factory.addStep(shell.Compile(command=["make"]))
207 perldir = 'build/Open-ILS/src/perlmods'
208 class PerlModuleTestMFHDMadness(shell.PerlModuleTest):
209 'Override PerlModuleTest with nonstandard library location for testlib.pm'
210 command = ['prove', '--lib', 'lib', '-I', 'lib/OpenILS/Utils/MFHD/test', '-r', 't']
213 def has_perl_unit_tests(step):
214 'Only run Perl tests if there are tests'
215 if (step.build.getProperty('branch') == 'branches/rel_1_6_1'):
217 elif (step.build.getProperty('branch') == 'branches/rel_2_0'):
221 # run the Perl unit tests
222 eg_factory.addStep(PerlModuleTestMFHDMadness(
223 doStepIf=has_perl_unit_tests,
227 # report on the Python code
228 eg_factory.addStep(python.PyLint(
229 env={"PYTHONPATH": ["Open-ILS/src/python"]},
230 flunkOnFailure=False,
232 "--output-format=parseable",
233 "Open-ILS/src/python/setup.py",
234 "Open-ILS/src/python/oils/const.py",
235 "Open-ILS/src/python/oils/event.py",
236 "Open-ILS/src/python/oils/__init__.py",
237 "Open-ILS/src/python/oils/org.py",
238 "Open-ILS/src/python/oils/srfsh.py",
239 "Open-ILS/src/python/oils/system.py",
240 "Open-ILS/src/python/oils/utils/csedit.py",
241 "Open-ILS/src/python/oils/utils/idl.py",
242 "Open-ILS/src/python/oils/utils/__init__.py",
243 "Open-ILS/src/python/oils/utils/utils.py"
247 from buildbot.config import BuilderConfig
250 c['builders'].append(
251 BuilderConfig(name="osrf-trunk-ubuntu-10.04-x86_64",
252 slavenames=["opensrf-slave"],
253 factory=osrf_factory))
254 c['builders'].append(
255 BuilderConfig(name="osrf-rel_1_6-ubuntu-10.04-x86_64",
256 slavenames=["opensrf-slave"],
257 factory=osrf_factory))
258 c['builders'].append(
259 BuilderConfig(name="osrf-rel_2_0-ubuntu-10.04-x86_64",
260 slavenames=["opensrf-slave"],
261 factory=osrf_factory))
264 c['builders'].append(
265 BuilderConfig(name="evergreen-rel_1_6_1-debian-6.00-x86_64",
266 slavenames=["eg-slave"],
268 c['builders'].append(
269 BuilderConfig(name="evergreen-rel_2_0-debian-6.00-x86_64",
270 slavenames=["eg-slave"],
272 c['builders'].append(
273 BuilderConfig(name="evergreen-rel_2_1-debian-6.00-x86_64",
274 slavenames=["eg-slave"],
276 c['builders'].append(
277 BuilderConfig(name="evergreen-trunk-debian-6.00-x86_64",
278 slavenames=["eg-slave"],
282 c['builders'].append(
283 BuilderConfig(name="evergreen-rel_1_6_1-ubuntu-8.04-x86",
284 slavenames=["eg-u804"],
286 c['builders'].append(
287 BuilderConfig(name="evergreen-rel_2_0-ubuntu-8.04-x86",
288 slavenames=["eg-u804"],
290 c['builders'].append(
291 BuilderConfig(name="evergreen-rel_2_1-ubuntu-8.04-x86",
292 slavenames=["eg-u804"],
294 c['builders'].append(
295 BuilderConfig(name="evergreen-trunk-ubuntu-8.04-x86",
296 slavenames=["eg-u804"],
300 c['builders'].append(
301 BuilderConfig(name="evergreen-rel_1_6_1-ubuntu-10.04-x86",
302 slavenames=["eg-u1004"],
304 c['builders'].append(
305 BuilderConfig(name="evergreen-rel_2_0-ubuntu-10.04-x86",
306 slavenames=["eg-u1004"],
308 c['builders'].append(
309 BuilderConfig(name="evergreen-rel_2_1-ubuntu-10.04-x86",
310 slavenames=["eg-u1004"],
312 c['builders'].append(
313 BuilderConfig(name="evergreen-trunk-ubuntu-10.04-x86",
314 slavenames=["eg-u1004"],
317 ####### STATUS TARGETS
319 # 'status' is a list of Status Targets. The results of each build will be
320 # pushed to these targets. buildbot/status/*.py has a variety to choose from,
321 # including web pages, email senders, and IRC bots.
325 from buildbot.status import html
326 from buildbot.status.web import auth, authz
328 users = [('XXX', 'XXX'), ('XXX', 'XXX')]
329 authz_cfg=authz.Authz(
330 auth=auth.BasicAuth(users),
331 # change any of these to True to enable; see the manual for more
333 gracefulShutdown = False,
334 forceBuild = 'auth', # use this to test your slave once it is set up
335 forceAllBuilds = False,
338 stopAllBuilds = False,
339 cancelPendingBuild = False,
341 c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
343 # Send mail when a build is broken
344 from buildbot.status.mail import MailNotifier
346 fromaddr="buildbot@testing.esilibrary.com",
347 sendToInterestedUsers=False,
349 extraRecipients=["dan@coffeecode.net","open-ils-dev@list.georgialibraries.org"])
351 # Uncomment to actually send mail
352 # c['status'].append(mn)
354 ####### PROJECT IDENTITY
356 # the 'projectName' string will be used to describe the project that this
357 # buildbot is working on. For example, it is used as the title of the
358 # waterfall HTML page. The 'projectURL' string will be used to provide a link
359 # from buildbot HTML pages to your project's home page.
361 c['projectName'] = "Evergreen and OpenSRF"
362 c['projectURL'] = "http://evergreen-ils.org/"
364 # the 'buildbotURL' string should point to the location where the buildbot's
365 # internal web server (usually the html.WebStatus page) is visible. This
366 # typically uses the port number set in the Waterfall 'status' entry, but
367 # with an externally-visible host name which the buildbot cannot figure out
370 c['buildbotURL'] = "http://testing.evergreen-ils.org/buildbot/"
374 # This specifies what database buildbot uses to store change and scheduler
375 # state. You can leave this at its default for all but the largest
377 c['db_url'] = "sqlite:///state.sqlite"