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("XXX", "XXX", max_builds=1)]
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'] = XXX
26 # the 'change_source' setting tells the buildmaster how it should find out
27 # about source code changes. Here we point to OpenSRF:
29 from buildbot.changes import svnpoller
30 c['change_source'] = svnpoller.SVNPoller(
32 svnurl='svn://svn.open-ils.org/OpenSRF',
33 split_file=svnpoller.split_file_branches,
37 from buildbot.schedulers.filter import ChangeFilter
38 trunk_filter = ChangeFilter(branch=None)
39 rel_1_6_filter = ChangeFilter(branch="branches/rel_1_6")
40 rel_2_0_filter = ChangeFilter(branch="branches/rel_2_0")
44 # Configure the Schedulers, which decide how to react to incoming changes. In this
45 # case, just kick off a 'runtests' build
47 from buildbot.scheduler import Scheduler
49 c['schedulers'].append(Scheduler(name="osrf-trunk-full",
51 change_filter=trunk_filter,
52 builderNames=["osrf-trunk-ubuntu-10.04-x86_64"]))
54 c['schedulers'].append(Scheduler(name="osrf-rel_1_6",
56 change_filter=rel_1_6_filter,
57 builderNames=["osrf-rel_1_6-ubuntu-10.04-x86_64"]))
59 c['schedulers'].append(Scheduler(name="osrf-rel_2_0",
61 change_filter=rel_2_0_filter,
62 builderNames=["osrf-rel_2_0-ubuntu-10.04-x86_64"]))
66 # The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
67 # what steps, and which slaves can execute them. Note that any particular build will
68 # only take place on one slave.
70 from buildbot.process.factory import BuildFactory
71 from buildbot.steps import source
72 from buildbot.steps import shell
73 from buildbot.steps import python
74 from buildbot.steps import python_twisted
76 factory = BuildFactory()
77 # check out the source
78 factory.addStep(source.SVN(
79 baseURL='svn://svn.open-ils.org/OpenSRF/',
80 defaultBranch='trunk',
84 factory.addStep(shell.ShellCommand(command=["./autogen.sh"]))
86 # configure (default args for now)
87 factory.addStep(shell.Configure())
90 factory.addStep(shell.Compile(command=["make"]))
92 # run the Perl unit tests
93 factory.addStep(shell.PerlModuleTest(workdir="build/src/perl"))
95 # run the Python unit tests (available after rel_1_6)
96 def has_python_unit_test(step):
97 return step.build.getProperty('branch') != 'branches/rel_1_6'
99 factory.addStep(python_twisted.Trial(
100 doStepIf=has_python_unit_test,
102 tests="src/python/tests/json_test.py"))
104 # report on the Python code
105 factory.addStep(python.PyLint(
106 env={"PYTHONPATH": ["src/python"]},
107 flunkOnFailure=False,
109 "--output-format=parseable",
110 "src/python/opensrf.py",
111 "src/python/osrf/app.py",
112 "src/python/osrf/cache.py",
113 "src/python/osrf/conf.py",
114 "src/python/osrf/const.py",
115 "src/python/osrf/ex.py",
116 "src/python/osrf/gateway.py",
117 "src/python/osrf/http_translator.py",
118 "src/python/osrf/json.py",
119 "src/python/osrf/log.py",
120 "src/python/osrf/net_obj.py",
121 "src/python/osrf/net.py",
122 "src/python/osrf/server.py",
123 "src/python/osrf/ses.py",
124 "src/python/osrf/set.py",
125 "src/python/osrf/stack.py",
126 "src/python/osrf/system.py",
127 "src/python/osrf/xml_obj.py",
128 "src/python/osrf/apps/example.py"]))
130 from buildbot.config import BuilderConfig
133 c['builders'].append(
134 BuilderConfig(name="osrf-trunk-ubuntu-10.04-x86_64",
135 slavenames=["opensrf-slave"],
137 c['builders'].append(
138 BuilderConfig(name="osrf-rel_1_6-ubuntu-10.04-x86_64",
139 slavenames=["opensrf-slave"],
141 c['builders'].append(
142 BuilderConfig(name="osrf-rel_2_0-ubuntu-10.04-x86_64",
143 slavenames=["opensrf-slave"],
146 ####### STATUS TARGETS
148 # 'status' is a list of Status Targets. The results of each build will be
149 # pushed to these targets. buildbot/status/*.py has a variety to choose from,
150 # including web pages, email senders, and IRC bots.
154 from buildbot.status import html
155 from buildbot.status.web import auth, authz
157 users = [('XXX', 'XXX'), ('XXX', 'XXX')]
158 authz_cfg=authz.Authz(
159 auth=auth.BasicAuth(users),
160 # change any of these to True to enable; see the manual for more
162 gracefulShutdown = False,
163 forceBuild = 'auth', # use this to test your slave once it is set up
164 forceAllBuilds = False,
167 stopAllBuilds = False,
168 cancelPendingBuild = False,
170 c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
172 # Send mail when a build is broken
173 from buildbot.status.mail import MailNotifier
175 fromaddr="buildbot@testing.esilibrary.com",
176 sendToInterestedUsers=False,
178 extraRecipients=["dan@coffeecode.net","open-ils-dev@list.georgialibraries.org"])
179 c['status'].append(mn)
181 ####### PROJECT IDENTITY
183 # the 'projectName' string will be used to describe the project that this
184 # buildbot is working on. For example, it is used as the title of the
185 # waterfall HTML page. The 'projectURL' string will be used to provide a link
186 # from buildbot HTML pages to your project's home page.
188 c['projectName'] = "OpenSRF"
189 c['projectURL'] = "http://evergreen-ils.org/"
191 # the 'buildbotURL' string should point to the location where the buildbot's
192 # internal web server (usually the html.WebStatus page) is visible. This
193 # typically uses the port number set in the Waterfall 'status' entry, but
194 # with an externally-visible host name which the buildbot cannot figure out
197 c['buildbotURL'] = "http://testing.evergreen-ils.org/buildbot/"
201 # This specifies what database buildbot uses to store change and scheduler
202 # state. You can leave this at its default for all but the largest
204 c['db_url'] = "sqlite:///state.sqlite"