Changed the year in the copyright banner(s) to 2019.
[citadel.git] / buildbot / master.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 (although the filename
6 # can be changed with the --basedir option to 'mktap buildbot master').
7
8 # It has one job: define a dictionary named BuildmasterConfig. This
9 # dictionary has a variety of keys to control different aspects of the
10 # buildmaster. They are documented in docs/config.xhtml .
11
12
13 # This is the dictionary that the buildmaster pays attention to. We also use
14 # a shorter alias to save typing.
15 c = BuildmasterConfig = {}
16
17 ####### BUILDSLAVES
18
19 # the 'slaves' list defines the set of allowable buildslaves. Each element is
20 # a tuple of bot-name and bot-password. These correspond to values given to
21 # the buildslave's mktap invocation.
22 from buildbot.buildslave import BuildSlave
23 c['slaves'] = [BuildSlave("bithorizon", "bithorizon_passvoid")]
24
25 # to limit to two concurrent builds on a slave, use
26 #  c['slaves'] = [BuildSlave("bot1name", "bot1passwd", max_builds=2)]
27
28
29 # 'slavePortnum' defines the TCP port to listen on. This must match the value
30 # configured into the buildslaves (with their --master option)
31
32 c['slavePortnum'] = 9989
33
34 ####### CHANGESOURCES
35
36 # the 'change_source' setting tells the buildmaster how it should find out
37 # about source code changes. Any class which implements IChangeSource can be
38 # put here: there are several in buildbot/changes/*.py to choose from.
39
40 from buildbot.changes.pb import PBChangeSource
41 c['change_source'] = PBChangeSource()
42
43 # For example, if you had CVSToys installed on your repository, and your
44 # CVSROOT/freshcfg file had an entry like this:
45 #pb = ConfigurationSet([
46 #    (None, None, None, PBService(userpass=('foo', 'bar'), port=4519)),
47 #    ])
48
49 # then you could use the following buildmaster Change Source to subscribe to
50 # the FreshCVS daemon and be notified on every commit:
51 #
52 #from buildbot.changes.freshcvs import FreshCVSSource
53 #fc_source = FreshCVSSource("cvs.example.com", 4519, "foo", "bar")
54 #c['change_source'] = fc_source
55
56 # or, use a PBChangeSource, and then have your repository's commit script run
57 # 'buildbot sendchange', or use contrib/svn_buildbot.py, or
58 # contrib/arch_buildbot.py :
59 #
60 #from buildbot.changes.pb import PBChangeSource
61 #c['change_source'] = PBChangeSource()
62
63
64 ####### SCHEDULERS
65
66 ## configure the Schedulers
67
68 from buildbot.scheduler import Scheduler
69 c['schedulers'] = []
70 c['schedulers'].append(Scheduler(name="all", branch=None,
71                                  treeStableTimer=2*60,
72                                  builderNames=["buildbot-citadel"]))
73
74
75 ####### BUILDERS
76
77 # the 'builders' list defines the Builders. Each one is configured with a
78 # dictionary, using the following keys:
79 #  name (required): the name used to describe this bilder
80 #  slavename (required): which slave to use, must appear in c['bots']
81 #  builddir (required): which subdirectory to run the builder in
82 #  factory (required): a BuildFactory to define how the build is run
83 #  periodicBuildTime (optional): if set, force a build every N seconds
84
85 # buildbot/process/factory.py provides several BuildFactory classes you can
86 # start with, which implement build processes for common targets (GNU
87 # autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the
88 # base class, and is configured with a series of BuildSteps. When the build
89 # is run, the appropriate buildslave is told to execute each Step in turn.
90
91 # the first BuildStep is typically responsible for obtaining a copy of the
92 # sources. There are source-obtaining Steps in buildbot/process/step.py for
93 # CVS, SVN, and others.
94
95 #cvsroot = ":pserver:anonymous@cvs.sourceforge.net:/cvsroot/buildbot"
96 #cvsmodule = "buildbot"
97
98 svnurl = 'svn://uncensored.citadel.org/'
99 defaultBranch = 'trunk/'
100 baseURL = 'svn://uncensored.citadel.org/'
101
102 from buildbot.steps import source, shell
103 from buildbot.process import factory
104 #from buildbot.steps import shell
105 from buildbot.steps.source import SVN
106 from buildbot.steps.shell import Compile
107 from buildbot.steps.python_twisted import Trial
108 f1 = factory.BuildFactory()
109 f1.addStep(SVN(defaultBranch=defaultBranch, baseURL=baseURL, mode="update"))
110
111 #f1.addStep(Compile(
112 #        name="LibCitadel: Bootstrap, configure",
113 #        command=["bash", "-c", "cd libcitadel; ./bootstrap; ./configure"]))
114
115
116
117 ################################################################################
118 # libcitadel
119 f1.addStep(shell.ShellCommand(
120         command=["./bootstrap"],
121         workdir="build/libcitadel",
122         description=["bootstrapping libcitadel"],
123         descriptionDone=["done"],
124         name="LibCitadel Bootstrap"
125         ))
126
127 f1.addStep(shell.ShellCommand(
128         command=["./configure"],
129         workdir="build/libcitadel",
130         description=["Configuring libcitadel"],
131         descriptionDone=["done"],
132         name="LibCitadel Configure"
133         ))
134
135
136 f1.addStep(Compile(command=["make", "all"],
137                    workdir="build/libcitadel",
138                    description=["Compiling libcitadel"],
139                    descriptionDone=["done"],
140                    name="LibCitadel Compile"
141 ))
142
143 f1.addStep(Compile(command=["make", "all"],
144                    workdir="build/libcitadel/tests/",
145                    description=["Compiling libcitadel Unit-Tests"],
146                    descriptionDone=["done"],
147                    name="LibCitadel Configure"
148                    ))
149
150
151 ################################################################################
152 # Citserver
153
154
155
156 f1.addStep(shell.ShellCommand(
157         command=["./bootstrap"],
158         workdir="build/citadel",
159         description=["bootstrapping citadel"],
160         descriptionDone=["done"],
161         name="Citadel Bootstrap"
162         ))
163
164 f1.addStep(shell.ShellCommand(
165         command=["./configure"],
166         workdir="build/citadel",
167         env={
168             'CFLAGS' : "-I $PWD/full/build/libcitadel/lib",
169             'LDFLAGS' : "-L${PWD}/full/build/libcitadel/.libs"
170             },
171         description=["Configuring citadel"],
172         descriptionDone=["done"],
173         name="Citadel Configure"
174         ))
175
176
177 f1.addStep(Compile(command=["make", "all"],
178                    workdir="build/citadel",
179                    description=["Compiling citadel"],
180                    descriptionDone=["done"],
181                    name="Citadel Compile"
182 ))
183
184
185
186
187
188 ################################################################################
189 # WebCit
190
191
192
193 f1.addStep(shell.ShellCommand(
194         command=["./bootstrap"],
195         workdir="build/webcit",
196         description=["bootstrapping webcit"],
197         descriptionDone=["done"],
198         name="WebCit Bootstrap"
199
200         ))
201
202 f1.addStep(shell.ShellCommand(
203         command=["./configure"],
204         workdir="build/webcit",
205         env={
206             'CFLAGS' : "-I ${PWD}/full/build/libcitadel/lib",
207             'LDFLAGS' : "-L${PWD}/full/build/libcitadel/.libs"
208             },
209         description=["Configuring webcit"],
210         descriptionDone=["done"],
211         name="WebCit Configure"
212         ))
213
214
215 f1.addStep(Compile(command=["make", "all"],
216                    workdir="build/webcit",
217                    description=["Compiling webcit"],
218                    descriptionDone=["done"],
219                    name="WebCit Compile"
220 ))
221
222 f1.addStep(Compile(command=["make", "all"],
223                    workdir="build/webcit/tests/",
224                    description=["Compiling webcit Unit-Tests"],
225                    descriptionDone=["done"],
226                    name="WebCit Testing"
227 ))
228
229
230 #>f1.addStep(shell.ShellCommand(
231 #>        command=["./configure"],
232 #>        workdir="build/libcitadel",
233 #>        description=["Configuring libcitadel"],
234 #>        descriptionDone=["done"]
235 #>        ))
236 #>
237
238 #f1.addStep(Compile(
239 #        name="LibCitadel: Bootstrap, configure",
240 #        command=["bash", "-c", "cd libcitadel; ./bootstrap; ./configure"]))
241 #f1.addStep(Compile(
242 #        name="LibCitadel: Compile",
243 #        command=["bash", "-c", "cd libcitadel; make; cd tests; make; make test"]))
244 #f1.addStep(Compile(
245 #        name="LibCitadel: Tests",
246 #        command=["bash", "-c", "cd libcitadel/tests; make; make test"]))
247 #f1.addStep(Compile(
248 #        name="CitServer: Bootstrap, configure",
249 #        command=["bash", "-c", 
250 #                 "cd citadel; ./bootstrap; "
251 #                 "./configure"],
252 #        env={
253 #            'CFLAGS' : "-I ../libcitadel/lib",
254 #            'LDFLAGS' : "-L../libcitadel/.libs"
255 #            }
256 #        ));
257
258
259 #f1.addStep(Compile(
260 #        name="CitServer: compile",
261 #        command=["bash", "-c", "cd citadel; make"]))
262 #f1.addStep(Compile(
263 #        name="Webcit: Configure",
264 #        command=["bash", "-c", 
265 #                 "cd webcit; ./bootstrap; "
266 #                 "export CFLAGS='-I ../libcitadel/lib';"
267 #                 "export LDFLAGS='-L../libcitadel/.libs';"
268 #                 "./configure"]))
269 #f1.addStep(Compile(
270 #        name="Webcit: Compile",
271 #        command=["bash", "-c", "cd webcit; make"]))
272
273
274 ##f1.addStep(Compile(command=["bash", "./autocompile", ""]))
275 #f1.addStep(Compile(command=["bash", "./autocompile", ""]))
276 #f1.addStep(Compile(command=["bash", "./autocompile", ""]))
277 #f1.addStep(Compile(command=["bash", "./autocompile", ""]))
278 #f1.addStep(Trial(testpath="."))
279
280 b1 = {'name': "buildbot-citadel",
281       'slavename': "bithorizon",
282       'builddir': "full",
283       'factory': f1,
284       }
285 c['builders'] = [b1]
286
287
288 ####### STATUS TARGETS
289
290 # 'status' is a list of Status Targets. The results of each build will be
291 # pushed to these targets. buildbot/status/*.py has a variety to choose from,
292 # including web pages, email senders, and IRC bots.
293
294 c['status'] = []
295
296 from buildbot.status import html
297 c['status'].append(html.WebStatus(http_port=8010, allowForce=True)) 
298
299 # from buildbot.status import mail
300 # c['status'].append(mail.MailNotifier(fromaddr="buildbot@localhost",
301 #                                      extraRecipients=["builds@example.com"],
302 #                                      sendToInterestedUsers=False))
303 #
304 # from buildbot.status import words
305 # c['status'].append(words.IRC(host="irc.example.com", nick="bb",
306 #                              channels=["#example"]))
307 #
308 # from buildbot.status import client
309 # c['status'].append(client.PBListener(9988))
310
311
312 ####### DEBUGGING OPTIONS
313
314 # if you set 'debugPassword', then you can connect to the buildmaster with
315 # the diagnostic tool in contrib/debugclient.py . From this tool, you can
316 # manually force builds and inject changes, which may be useful for testing
317 # your buildmaster without actually commiting changes to your repository (or
318 # before you have a functioning 'sources' set up). The debug tool uses the
319 # same port number as the slaves do: 'slavePortnum'.
320
321 c['debugPassword'] = "debugpassword"
322
323 # if you set 'manhole', you can ssh into the buildmaster and get an
324 # interactive python shell, which may be useful for debugging buildbot
325 # internals. It is probably only useful for buildbot developers. You can also
326 # use an authorized_keys file, or plain telnet.
327 #from buildbot import manhole
328 #c['manhole'] = manhole.PasswordManhole("tcp:9999:interface=127.0.0.1",
329 #                                       "admin", "password")
330
331
332 ####### PROJECT IDENTITY
333
334 # the 'projectName' string will be used to describe the project that this
335 # buildbot is working on. For example, it is used as the title of the
336 # waterfall HTML page. The 'projectURL' string will be used to provide a link
337 # from buildbot HTML pages to your project's home page.
338
339 c['projectName'] = "Citadel"
340 c['projectURL'] = "http://www.citadel.org/"
341
342 # the 'buildbotURL' string should point to the location where the buildbot's
343 # internal web server (usually the html.Waterfall page) is visible. This
344 # typically uses the port number set in the Waterfall 'status' entry, but
345 # with an externally-visible host name which the buildbot cannot figure out
346 # without some help.
347
348 c['buildbotURL'] = "http://dothebart.dyndns.org/buildbot/"
349  
350
351 from buildbot.status import words
352 c['status'].append(
353     words.IRC(
354         host="irc.freenode.net", 
355         nick="bb-citadel",
356         channels=["#citadel"],
357         password="mysecretpassword",
358         notify_events={
359             'exception': 1,
360             'successToFailure': 1,
361             'failureToSuccess': 1
362             }
363         ))