]> git.evergreen-ils.org Git - OpenSRF.git/blob - examples/buildbot.cfg
Try sending failure notification to the -dev list
[OpenSRF.git] / examples / buildbot.cfg
1 # -*- python -*-
2 # ex: set syntax=python:
3
4 # This is a sample buildmaster config file. It must be installed as
5 # 'master.cfg' in your buildmaster's base directory.
6
7 # This is the dictionary that the buildmaster pays attention to. We also use
8 # a shorter alias to save typing.
9 c = BuildmasterConfig = {}
10
11 ####### BUILDSLAVES
12
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")]
18
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
21 # --master option)
22 c['slavePortnum'] = XXX
23
24 ####### CHANGESOURCES
25
26 # the 'change_source' setting tells the buildmaster how it should find out
27 # about source code changes.  Here we point to OpenSRF trunk:
28
29 from buildbot.changes.svnpoller import SVNPoller
30 c['change_source'] = SVNPoller(
31         project='OpenSRF trunk',
32         svnurl='svn://svn.open-ils.org/OpenSRF/trunk',
33         pollinterval=600)
34
35 ####### SCHEDULERS
36
37 # Configure the Schedulers, which decide how to react to incoming changes.  In this
38 # case, just kick off a 'runtests' build
39
40 from buildbot.scheduler import Scheduler
41 c['schedulers'] = []
42 c['schedulers'].append(Scheduler(name="all", branch=None,
43                                  treeStableTimer=None,
44                                  builderNames=["osrf-trunk-ubuntu-10.04-x86_64"]))
45
46 ####### BUILDERS
47
48 # The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
49 # what steps, and which slaves can execute them.  Note that any particular build will
50 # only take place on one slave.
51
52 from buildbot.process.factory import BuildFactory
53 from buildbot.steps import source 
54 from buildbot.steps import shell
55 from buildbot.steps import python
56 from buildbot.steps import python_twisted
57
58 factory = BuildFactory()
59 # check out the source
60 factory.addStep(source.SVN(
61         baseURL='svn://svn.open-ils.org/OpenSRF/',
62         defaultBranch='trunk',
63         mode='copy'))
64
65 # bootstrap the code
66 factory.addStep(shell.ShellCommand(command=["./autogen.sh"]))
67
68 # configure (default args for now)
69 factory.addStep(shell.Configure())
70
71 # compile the code
72 factory.addStep(shell.Compile(command=["make"]))
73
74 # run the Perl unit tests
75 factory.addStep(shell.PerlModuleTest(workdir="build/src/perl"))
76
77 # run the Python unit tests
78 factory.addStep(python_twisted.Trial(
79         testpath="build",
80         tests="src/python/tests/json_test.py"))
81
82 # report on the Python code
83 factory.addStep(python.PyLint(
84         env={"PYTHONPATH": ["src/python"]},
85         flunkOnFailure=False,
86         command=["pylint", 
87                 "--output-format=parseable",
88                 "src/python/opensrf.py",
89                 "src/python/osrf/app.py",
90                 "src/python/osrf/cache.py",
91                 "src/python/osrf/conf.py",
92                 "src/python/osrf/const.py",
93                 "src/python/osrf/ex.py",
94                 "src/python/osrf/gateway.py",
95                 "src/python/osrf/http_translator.py",
96                 "src/python/osrf/json.py",
97                 "src/python/osrf/log.py",
98                 "src/python/osrf/net_obj.py",
99                 "src/python/osrf/net.py",
100                 "src/python/osrf/server.py",
101                 "src/python/osrf/ses.py",
102                 "src/python/osrf/set.py",
103                 "src/python/osrf/stack.py",
104                 "src/python/osrf/system.py",
105                 "src/python/osrf/xml_obj.py",
106                 "src/python/osrf/apps/example.py"]))
107
108 from buildbot.config import BuilderConfig
109
110 c['builders'] = []
111 c['builders'].append(
112     BuilderConfig(name="osrf-trunk-ubuntu-10.04-x86_64",
113       slavenames=["opensrf-slave"],
114       factory=factory))
115
116 ####### STATUS TARGETS
117
118 # 'status' is a list of Status Targets. The results of each build will be
119 # pushed to these targets. buildbot/status/*.py has a variety to choose from,
120 # including web pages, email senders, and IRC bots.
121
122 c['status'] = []
123
124 from buildbot.status import html
125 from buildbot.status.web import auth, authz
126
127 users = [('XXX', 'XXX'), ('XXX', 'XXX')]
128 authz_cfg=authz.Authz(
129     auth=auth.BasicAuth(users),
130     # change any of these to True to enable; see the manual for more
131     # options
132     gracefulShutdown = False,
133     forceBuild = 'auth', # use this to test your slave once it is set up
134     forceAllBuilds = False,
135     pingBuilder = False,
136     stopBuild = False,
137     stopAllBuilds = False,
138     cancelPendingBuild = False,
139 )
140 c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
141
142 # Send mail when a build is broken
143 from buildbot.status.mail import MailNotifier
144 mn = MailNotifier(
145     fromaddr="buildbot@testing.esilibrary.com",
146     sendToInterestedUsers=False,
147     mode='problem',
148     extraRecipients=["dan@coffeecode.net","open-ils-dev@list.georgialibraries.org"])
149 c['status'].append(mn)
150
151 ####### PROJECT IDENTITY
152
153 # the 'projectName' string will be used to describe the project that this
154 # buildbot is working on. For example, it is used as the title of the
155 # waterfall HTML page. The 'projectURL' string will be used to provide a link
156 # from buildbot HTML pages to your project's home page.
157
158 c['projectName'] = "OpenSRF trunk"
159 c['projectURL'] = "http://evergreen-ils.org/"
160
161 # the 'buildbotURL' string should point to the location where the buildbot's
162 # internal web server (usually the html.WebStatus page) is visible. This
163 # typically uses the port number set in the Waterfall 'status' entry, but
164 # with an externally-visible host name which the buildbot cannot figure out
165 # without some help.
166
167 c['buildbotURL'] = "http://testing.evergreen-ils.org/buildbot/"
168
169 ####### DB URL
170
171 # This specifies what database buildbot uses to store change and scheduler
172 # state.  You can leave this at its default for all but the largest
173 # installations.
174 c['db_url'] = "sqlite:///state.sqlite"
175