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)
22 # 'slavePortnum' defines the TCP port to listen on for connections from slaves.
23 # This must match the value configured into the buildslaves (with their
25 c['slavePortnum'] = XXX
29 # the 'change_source' setting tells the buildmaster how it should find out
30 # about source code changes. Here we point to OpenSRF:
31 def split_file_branches_trunk(path):
32 pieces = path.split('/')
33 if pieces[0] == 'trunk':
34 return ('trunk', '/'.join(pieces[1:]))
35 elif pieces[0] == 'branches':
36 return ('/'.join(pieces[0:2]),
41 from buildbot.changes import svnpoller
42 c['change_source'] = (
45 svnurl='svn://svn.open-ils.org/OpenSRF',
46 split_file=svnpoller.split_file_branches,
50 svnurl='svn://svn.open-ils.org/ILS',
51 split_file=svnpoller.split_file_branches,
56 from buildbot.schedulers.filter import ChangeFilter
57 trunk_filter = ChangeFilter(branch=None)
58 rel_1_6_filter = ChangeFilter(branch="branches/rel_1_6")
59 rel_2_0_filter = ChangeFilter(branch="branches/rel_2_0")
60 eg_rel_1_6_1_filter = ChangeFilter(branch="branches/rel_1_6_1")
61 eg_rel_2_0_filter = ChangeFilter(branch="branches/rel_2_0")
62 eg_rel_2_1_filter = ChangeFilter(branch="branches/rel_2_1")
63 eg_trunk_filter = ChangeFilter(branch=None)
67 # Configure the Schedulers, which decide how to react to incoming changes. In this
68 # case, just kick off a 'runtests' build
70 from buildbot.scheduler import Scheduler
72 c['schedulers'].append(Scheduler(name="osrf-trunk-full",
74 change_filter=trunk_filter,
75 builderNames=["osrf-trunk-ubuntu-10.04-x86_64"]))
77 c['schedulers'].append(Scheduler(name="osrf-rel_1_6",
79 change_filter=rel_1_6_filter,
80 builderNames=["osrf-rel_1_6-ubuntu-10.04-x86_64"]))
82 c['schedulers'].append(Scheduler(name="osrf-rel_2_0",
84 change_filter=rel_2_0_filter,
85 builderNames=["osrf-rel_2_0-ubuntu-10.04-x86_64"]))
87 c['schedulers'].append(Scheduler(name="evergreen-rel_1_6_1",
89 change_filter=eg_rel_1_6_1_filter,
90 builderNames=["evergreen-rel_1_6_1-debian-6.00-x86_64"]))
92 c['schedulers'].append(Scheduler(name="evergreen-rel_2_0",
94 change_filter=eg_rel_2_0_filter,
95 builderNames=["evergreen-rel_2_0-debian-6.00-x86_64"]))
97 c['schedulers'].append(Scheduler(name="evergreen-rel_2_1",
99 change_filter=eg_rel_2_1_filter,
100 builderNames=["evergreen-rel_2_1-debian-6.00-x86_64"]))
102 c['schedulers'].append(Scheduler(name="evergreen-trunk",
104 change_filter=eg_trunk_filter,
105 builderNames=["evergreen-trunk-debian-6.00-x86_64"]))
109 # The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
110 # what steps, and which slaves can execute them. Note that any particular build will
111 # only take place on one slave.
113 from buildbot.process.factory import BuildFactory
114 from buildbot.steps import source
115 from buildbot.steps import shell
116 from buildbot.steps import python
117 from buildbot.steps import python_twisted
119 osrf_factory = BuildFactory()
120 # check out the source
121 osrf_factory.addStep(source.SVN(
122 baseURL='svn://svn.open-ils.org/OpenSRF/',
123 defaultBranch='trunk',
127 osrf_factory.addStep(shell.ShellCommand(command=["./autogen.sh"]))
129 # configure (default args for now)
130 osrf_factory.addStep(shell.Configure())
133 osrf_factory.addStep(shell.Compile(command=["make"]))
135 # run the Perl unit tests
136 osrf_factory.addStep(shell.PerlModuleTest(workdir="build/src/perl"))
138 # run the Python unit tests (available after rel_1_6)
139 def has_python_unit_test(step):
140 return step.build.getProperty('branch') != 'branches/rel_1_6'
142 osrf_factory.addStep(python_twisted.Trial(
143 doStepIf=has_python_unit_test,
145 tests="src/python/tests/json_test.py"))
147 # report on the Python code
148 osrf_factory.addStep(python.PyLint(
149 env={"PYTHONPATH": ["src/python"]},
150 flunkOnFailure=False,
152 "--output-format=parseable",
153 "src/python/opensrf.py",
154 "src/python/osrf/app.py",
155 "src/python/osrf/cache.py",
156 "src/python/osrf/conf.py",
157 "src/python/osrf/const.py",
158 "src/python/osrf/ex.py",
159 "src/python/osrf/gateway.py",
160 "src/python/osrf/http_translator.py",
161 "src/python/osrf/json.py",
162 "src/python/osrf/log.py",
163 "src/python/osrf/net_obj.py",
164 "src/python/osrf/net.py",
165 "src/python/osrf/server.py",
166 "src/python/osrf/ses.py",
167 "src/python/osrf/set.py",
168 "src/python/osrf/stack.py",
169 "src/python/osrf/system.py",
170 "src/python/osrf/xml_obj.py",
171 "src/python/osrf/apps/example.py"]))
173 eg_factory = BuildFactory()
174 # check out the source
175 eg_factory.addStep(source.SVN(
176 baseURL='svn://svn.open-ils.org/ILS/',
177 defaultBranch='trunk',
181 eg_factory.addStep(shell.ShellCommand(command=["./autogen.sh"]))
183 # configure (default args for now)
184 eg_factory.addStep(shell.Configure())
187 eg_factory.addStep(shell.Compile(command=["make"]))
189 # run the Perl unit tests
190 eg_factory.addStep(shell.PerlModuleTest(workdir="build/Open-ILS/src/perlmods"))
192 # report on the Python code
193 eg_factory.addStep(python.PyLint(
194 env={"PYTHONPATH": ["Open-ILS/src/python"]},
195 flunkOnFailure=False,
197 "--output-format=parseable",
198 "Open-ILS/src/python/setup.py",
199 "Open-ILS/src/python/oils/const.py",
200 "Open-ILS/src/python/oils/event.py",
201 "Open-ILS/src/python/oils/__init__.py",
202 "Open-ILS/src/python/oils/org.py",
203 "Open-ILS/src/python/oils/srfsh.py",
204 "Open-ILS/src/python/oils/system.py",
205 "Open-ILS/src/python/oils/utils/csedit.py",
206 "Open-ILS/src/python/oils/utils/idl.py",
207 "Open-ILS/src/python/oils/utils/__init__.py",
208 "Open-ILS/src/python/oils/utils/utils.py"
212 from buildbot.config import BuilderConfig
215 c['builders'].append(
216 BuilderConfig(name="osrf-trunk-ubuntu-10.04-x86_64",
217 slavenames=["opensrf-slave"],
218 factory=osrf_factory))
219 c['builders'].append(
220 BuilderConfig(name="osrf-rel_1_6-ubuntu-10.04-x86_64",
221 slavenames=["opensrf-slave"],
222 factory=osrf_factory))
223 c['builders'].append(
224 BuilderConfig(name="osrf-rel_2_0-ubuntu-10.04-x86_64",
225 slavenames=["opensrf-slave"],
226 factory=osrf_factory))
227 c['builders'].append(
228 BuilderConfig(name="evergreen-rel_1_6_1-debian-6.00-x86_64",
229 slavenames=["eg-slave"],
231 c['builders'].append(
232 BuilderConfig(name="evergreen-rel_2_0-debian-6.00-x86_64",
233 slavenames=["eg-slave"],
235 c['builders'].append(
236 BuilderConfig(name="evergreen-rel_2_1-debian-6.00-x86_64",
237 slavenames=["eg-slave"],
239 c['builders'].append(
240 BuilderConfig(name="evergreen-trunk-debian-6.00-x86_64",
241 slavenames=["eg-slave"],
244 ####### STATUS TARGETS
246 # 'status' is a list of Status Targets. The results of each build will be
247 # pushed to these targets. buildbot/status/*.py has a variety to choose from,
248 # including web pages, email senders, and IRC bots.
252 from buildbot.status import html
253 from buildbot.status.web import auth, authz
255 users = [('XXX', 'XXX'), ('XXX', 'XXX')]
256 authz_cfg=authz.Authz(
257 auth=auth.BasicAuth(users),
258 # change any of these to True to enable; see the manual for more
260 gracefulShutdown = False,
261 forceBuild = 'auth', # use this to test your slave once it is set up
262 forceAllBuilds = False,
265 stopAllBuilds = False,
266 cancelPendingBuild = False,
268 c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
270 # Send mail when a build is broken
271 from buildbot.status.mail import MailNotifier
273 fromaddr="buildbot@testing.esilibrary.com",
274 sendToInterestedUsers=False,
276 extraRecipients=["dan@coffeecode.net","open-ils-dev@list.georgialibraries.org"])
278 # Uncomment to actually send mail
279 # c['status'].append(mn)
281 ####### PROJECT IDENTITY
283 # the 'projectName' string will be used to describe the project that this
284 # buildbot is working on. For example, it is used as the title of the
285 # waterfall HTML page. The 'projectURL' string will be used to provide a link
286 # from buildbot HTML pages to your project's home page.
288 c['projectName'] = "Evergreen and OpenSRF"
289 c['projectURL'] = "http://evergreen-ils.org/"
291 # the 'buildbotURL' string should point to the location where the buildbot's
292 # internal web server (usually the html.WebStatus page) is visible. This
293 # typically uses the port number set in the Waterfall 'status' entry, but
294 # with an externally-visible host name which the buildbot cannot figure out
297 c['buildbotURL'] = "http://testing.evergreen-ils.org/buildbot/"
301 # This specifies what database buildbot uses to store change and scheduler
302 # state. You can leave this at its default for all but the largest
304 c['db_url'] = "sqlite:///state.sqlite"