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(
31 project='OpenSRF trunk',
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="trunk")
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/%%BRANCH%%',
83 factory.addStep(shell.ShellCommand(command=["./autogen.sh"]))
85 # configure (default args for now)
86 factory.addStep(shell.Configure())
89 factory.addStep(shell.Compile(command=["make"]))
91 # run the Perl unit tests
92 factory.addStep(shell.PerlModuleTest(workdir="build/src/perl"))
94 # run the Python unit tests (available after rel_1_6)
95 def has_python_unit_test(step):
96 return step.build.getProperty('branch') != 'branches/rel_1_6'
98 factory.addStep(python_twisted.Trial(
99 doStepIf=has_python_unit_test,
101 tests="src/python/tests/json_test.py"))
103 # report on the Python code
104 factory.addStep(python.PyLint(
105 env={"PYTHONPATH": ["src/python"]},
106 flunkOnFailure=False,
108 "--output-format=parseable",
109 "src/python/opensrf.py",
110 "src/python/osrf/app.py",
111 "src/python/osrf/cache.py",
112 "src/python/osrf/conf.py",
113 "src/python/osrf/const.py",
114 "src/python/osrf/ex.py",
115 "src/python/osrf/gateway.py",
116 "src/python/osrf/http_translator.py",
117 "src/python/osrf/json.py",
118 "src/python/osrf/log.py",
119 "src/python/osrf/net_obj.py",
120 "src/python/osrf/net.py",
121 "src/python/osrf/server.py",
122 "src/python/osrf/ses.py",
123 "src/python/osrf/set.py",
124 "src/python/osrf/stack.py",
125 "src/python/osrf/system.py",
126 "src/python/osrf/xml_obj.py",
127 "src/python/osrf/apps/example.py"]))
129 from buildbot.config import BuilderConfig
132 c['builders'].append(
133 BuilderConfig(name="osrf-trunk-ubuntu-10.04-x86_64",
134 slavenames=["opensrf-slave"],
136 c['builders'].append(
137 BuilderConfig(name="osrf-rel_1_6-ubuntu-10.04-x86_64",
138 slavenames=["opensrf-slave"],
140 c['builders'].append(
141 BuilderConfig(name="osrf-rel_2_0-ubuntu-10.04-x86_64",
142 slavenames=["opensrf-slave"],
145 ####### STATUS TARGETS
147 # 'status' is a list of Status Targets. The results of each build will be
148 # pushed to these targets. buildbot/status/*.py has a variety to choose from,
149 # including web pages, email senders, and IRC bots.
153 from buildbot.status import html
154 from buildbot.status.web import auth, authz
156 users = [('XXX', 'XXX'), ('XXX', 'XXX')]
157 authz_cfg=authz.Authz(
158 auth=auth.BasicAuth(users),
159 # change any of these to True to enable; see the manual for more
161 gracefulShutdown = False,
162 forceBuild = 'auth', # use this to test your slave once it is set up
163 forceAllBuilds = False,
166 stopAllBuilds = False,
167 cancelPendingBuild = False,
169 c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
171 # Send mail when a build is broken
172 from buildbot.status.mail import MailNotifier
174 fromaddr="buildbot@testing.esilibrary.com",
175 sendToInterestedUsers=False,
177 extraRecipients=["dan@coffeecode.net","open-ils-dev@list.georgialibraries.org"])
178 c['status'].append(mn)
180 ####### PROJECT IDENTITY
182 # the 'projectName' string will be used to describe the project that this
183 # buildbot is working on. For example, it is used as the title of the
184 # waterfall HTML page. The 'projectURL' string will be used to provide a link
185 # from buildbot HTML pages to your project's home page.
187 c['projectName'] = "OpenSRF trunk"
188 c['projectURL'] = "http://evergreen-ils.org/"
190 # the 'buildbotURL' string should point to the location where the buildbot's
191 # internal web server (usually the html.WebStatus page) is visible. This
192 # typically uses the port number set in the Waterfall 'status' entry, but
193 # with an externally-visible host name which the buildbot cannot figure out
196 c['buildbotURL'] = "http://testing.evergreen-ils.org/buildbot/"
200 # This specifies what database buildbot uses to store change and scheduler
201 # state. You can leave this at its default for all but the largest
203 c['db_url'] = "sqlite:///state.sqlite"