root/mail-onna-stick/trunk/support/buildbot/buildmaster/master.cfg

Revision 323, 10.4 kB (checked in by t, 11 years ago)

updated master cfg file.

Line 
1 # -*- python -*-
2
3 # This is a sample buildmaster config file. It must be installed as
4 # 'master.cfg' in your buildmaster's base directory (although the filename
5 # can be changed with the --basedir option to 'mktap buildbot master').
6
7 # It has one job: define a dictionary named BuildmasterConfig. This
8 # dictionary has a variety of keys to control different aspects of the
9 # buildmaster. They are documented in docs/config.xhtml .
10
11 import os.path
12 from buildbot.changes.pb import PBChangeSource
13 from buildbot.scheduler import Scheduler, Periodic, Try_Userpass
14 from buildbot.process import step, factory
15 from buildbot.status import html, client
16 from buildbot import locks
17
18 s = factory.s
19
20 # prevent HTTP port binding, firefox, and fitnesse conflicts.
21 port_lock = locks.SlaveLock("ports")
22 firefox_lock = locks.SlaveLock("firefox")
23 fitnesse_lock = locks.SlaveLock("fitnesse")
24
25 from buildbot.process.step import ShellCommand
26
27 import secrets
28 from extensions import UnitTests, TextTests, BuildEgg, InstallEgg, \
29         ProfilingTwillTests, SeleniumTests, DocStuff
30 from extensions import FitnesseTests, VarDirClean, VarDirPost
31
32 # Currently used on agilistas.org
33 BUILDBOT_SCRIPT_DIR = "/home/buildbot/MOS/bot_scripts"
34
35 # This is the dictionary that the buildmaster pays attention to. We also use
36 # a shorter alias to save typing.
37 c = BuildmasterConfig = {}
38
39 # the 'bots' list defines the set of allowable buildslaves. Each element is a
40 # tuple of bot-name and bot-password. These correspond to values given to the
41 # buildslave's mktap invocation.
42 c['bots'] = [("vallista", secrets.vallista),
43              ("agilistas_rh9_py2.4", secrets.agilistas_py24),
44              ]
45
46
47 # the 'sources' list tells the buildmaster how it should find out about
48 # source code changes. Any class which implements IChangeSource can be added
49 # to this list: there are several in buildbot/changes/*.py to choose from.
50
51 c['sources'] = [ PBChangeSource() ]
52
53 # the 'builders' list defines the Builders. Each one is configured with a
54 # dictionary, using the following keys:
55 #  name (required): the name used to describe this bilder
56 #  slavename (required): which slave to use, must appear in c['bots']
57 #  builddir (required): which subdirectory to run the builder in
58 #  factory (required): a BuildFactory to define how the build is run
59 #  periodicBuildTime (optional): if set, force a build every N seconds
60
61 # common: clean vardir!
62 reset_vardir = s(VarDirClean,
63                  command="support/buildbot/buildslave/bot_scripts/clean-vardir.sh")
64
65 # individual: post vardir results!
66 post_vardir23 = s(VarDirPost,
67                 command="support/buildbot/buildslave/bot_scripts/post-vardir.py vallista-py2.3 /u/buildbot/.html")
68
69 post_vardir24 = s(VarDirPost,
70                 command="support/buildbot/buildslave/bot_scripts/post-vardir.py vallista-py2.4 /u/buildbot/.html")
71
72 doc_stuff = s(DocStuff,
73               command='support/buildbot/buildslave/bot_scripts/doc-stuff.sh')
74
75 # common: get the source!
76
77 source = s(step.SVN, mode='update',
78            baseURL='http://svn.idyll.org/repos/agile/mail-onna-stick/', \
79            defaultBranch='trunk')
80
81 #### Python 2.3 tests for vallista
82
83 unit_tests23 = s(UnitTests,
84                  command="/usr/bin/python2.3 bin/run-timed-unit-tests",
85                  locks=[port_lock])
86
87 profiling_tests23 = s(ProfilingTwillTests,
88                       command="/usr/bin/python2.3 bin/profile-twill-tests",
89                       locks=[port_lock])
90
91 build_egg23 = s(BuildEgg,
92                 command="/usr/bin/python2.3 support/buildbot/buildslave/bot_scripts/build_egg.py")
93
94 install_egg23 = s(InstallEgg,
95                   command="/usr/bin/python2.3 support/buildbot/buildslave/bot_scripts/install_egg.py")
96
97 text_tests23 = s(TextTests,
98                  command="/usr/bin/python2.3 bin/run-texttest /usr/local/lib/texttest")
99
100 fitnesse23 = s(FitnesseTests,
101                      command="/usr/bin/python2.3 support/buildbot/buildslave/bot_scripts/run-fitnesse.py /u/buildbot/fitnesse /usr/bin/java /u/buildbot/vallista-buildslave/test-MOS-2.3/build/tests/ MosAcceptanceTests",
102                      locks=[fitnesse_lock])
103
104 selenium_23 = s(SeleniumTests,
105                 command="/usr/bin/python2.3 support/buildbot/buildslave/bot_scripts/run-selenium.py 8082",
106                 locks=[firefox_lock])
107
108 f23 = factory.BuildFactory([source,
109                             reset_vardir,
110                             unit_tests23,
111                             profiling_tests23,
112                             build_egg23,
113                             install_egg23,
114                             text_tests23,
115                             fitnesse23,
116                             selenium_23,
117                             doc_stuff,
118                             post_vardir23,
119 ])
120
121 post_vardir_selen = s(VarDirPost,
122                 command="support/buildbot/buildslave/bot_scripts/post-vardir.py vallista-selenium-only /u/buildbot/.html")
123
124 f_selen_stuff = factory.BuildFactory([source, reset_vardir, selenium_23, post_vardir_selen])
125
126 #### Python 2.4 tests for vallista
127
128 unit_tests24 = s(UnitTests,
129                  command="/usr/bin/python2.4 bin/run-timed-unit-tests",
130                  locks=[port_lock])
131
132 profiling_tests24 = s(ProfilingTwillTests,
133                       command="/usr/bin/python2.3 bin/profile-twill-tests",
134                       locks=[port_lock])
135
136 build_egg24 = s(BuildEgg,
137                 command="/usr/bin/python2.4 support/buildbot/buildslave/bot_scripts/build_egg.py")
138
139 install_egg24 = s(InstallEgg,
140                   command="/usr/bin/python2.4 support/buildbot/buildslave/bot_scripts/install_egg.py")
141
142 selenium_24 = s(SeleniumTests,
143                 command="/usr/bin/python2.4 support/buildbot/buildslave/bot_scripts/run-selenium.py 8082",
144                 locks=[firefox_lock])
145
146 text_tests24 = s(TextTests,
147                  command="/usr/bin/python2.4 bin/run-texttest /usr/local/lib/texttest")
148
149 fitnesse24 = s(FitnesseTests,
150                      command="/usr/bin/python2.4 support/buildbot/buildslave/bot_scripts/run-fitnesse.py /u/buildbot/fitnesse /usr/bin/java /u/buildbot/vallista-buildslave/test-MOS-2.4/build/tests MosAcceptanceTests",
151                      locks=[fitnesse_lock])
152
153 f24 = factory.BuildFactory([source,
154                             reset_vardir,
155                             unit_tests24,
156                             profiling_tests24,
157                             build_egg24,
158                             install_egg24,
159                             selenium_24,
160                             text_tests24,
161                             fitnesse24,
162                             doc_stuff,
163                             post_vardir24,
164 ])
165
166 #### Python 2.4 tests for agilistas
167
168 unit_tests_default = s(UnitTests,
169                        command="/usr/local/bin/python bin/run-timed-unit-tests")
170 text_tests = s(TextTests,
171                command="/usr/local/bin/python bin/run-texttest /usr/local/texttest")
172 fitnesse_tests = s(FitnesseTests,
173                    command="%s/test_fitnesse.py" % BUILDBOT_SCRIPT_DIR)
174
175 build_egg = s(BuildEgg,
176               command="/usr/local/bin/python support/buildbot/buildslave/bot_scripts/build_egg.py")
177 install_egg = s(InstallEgg,
178                 command="/usr/local/bin/python support/buildbot/buildslave/bot_scripts/install_egg.py")
179
180 f_agilistas = factory.BuildFactory([source,
181                                     reset_vardir,
182                                     unit_tests_default,
183                                     text_tests,
184                                     fitnesse_tests,
185                                     build_egg,
186                                     install_egg,
187 ])
188
189 ###
190
191 c['builders'] = [
192     # vallista, Python 2.3
193     dict(name='vallista-py2.3_trunk',
194          slavename='vallista',
195          builddir='test-MOS-2.3',
196          factory=f23,
197          ),
198
199     # vallista, Python 2.4
200     dict(name='vallista-py2.4_trunk',
201          slavename='vallista',
202          builddir='test-MOS-2.4',
203          factory=f24,
204          ),
205
206     # agilistas
207     dict(name='agilistas-py2.4_trunk',
208          slavename='agilistas_rh9_py2.4',
209          builddir='test-MOS-linux',
210          factory=f_agilistas),
211
212     # temporary selenium-specific one
213     dict(name='vallista-selenium-only',
214          slavename='vallista',
215          builddir='vallista-selenium',
216          factory=f_selen_stuff),
217 ]
218
219 # 'slavePortnum' defines the TCP port to listen on. This must match the value
220 # configured into the buildslaves (with their --master option)
221
222 c['slavePortnum'] = 9989
223
224 # 'status' is a list of Status Targets. The results of each build will be
225 # pushed to these targets. buildbot/status/*.py has a variety to choose from,
226 # including web pages, email senders, and IRC bots.
227
228 c['status'] = []
229 c['status'].append(html.Waterfall(http_port="tcp:12344:interface=127.0.0.1",
230                                             allowForce=False))
231 c['status'].append(html.Waterfall(http_port="tcp:12345:interface=127.0.0.1"))
232
233 from buildbot.status import mail
234 c['status'].append(mail.MailNotifier(fromaddr="agile-trac-track@idyll.org",
235                                      relayhost="floating.idyll.org",
236                                      mode="failing",
237                                extraRecipients=["agile-trac-track@idyll.org"],
238                                       sendToInterestedUsers=False))
239
240 # the 'projectName' string will be used to describe the project that this
241 # buildbot is working on. For example, it is used as the title of the
242 # waterfall HTML page. The 'projectURL' string will be used to provide a link
243 # from buildbot HTML pages to your project's home page.
244
245 c['projectName'] = "MailOnnaStick"
246 c['projectURL'] = "http://agile.idyll.org/"
247
248 # the 'buildbotURL' string should point to the location where the buildbot's
249 # internal web server (usually the html.Waterfall page) is visible. This
250 # typically uses the port number set in the Waterfall 'status' entry, but
251 # with an externally-visible host name which the buildbot cannot figure out
252 # without some help.
253
254 c['buildbotURL'] = "http://agile.idyll.org/buildbot/"
255
256 ###
257
258 ## configure the Schedulers
259
260 periodic = Periodic('every_6_hrs', ['vallista-py2.3_trunk',],
261                                     6*60*60)
262 periodic2 = Periodic('every_6_hrs+10', ['vallista-py2.4_trunk',],
263                                     6*60*60+10*60)
264 periodic3 = Periodic('every_6_hrs+20', ['agilistas-py2.4_trunk',],
265                                     6*60*60+20*60)
266
267 all_builders = [b['name'] for b in c['builders']]
268
269 s_all = Scheduler(name="all", branch=None, treeStableTimer=0,
270                 builderNames=all_builders)
271
272 c['schedulers'] = [periodic, periodic2, periodic3, s_all]
Note: See TracBrowser for help on using the browser.