3 # This configuration file is described in $BUILDBOT/docs/config.xhtml
5 # This is used (with online=True) to run the Twisted Buildbot at
6 # http://www.twistedmatrix.com/buildbot/ . Passwords and other secret
7 # information are loaded from a neighboring file called 'private.py'.
10 sys
.path
.append('/home/buildbot/BuildBot/support-master')
14 from buildbot
.changes
.pb
import PBChangeSource
15 from buildbot
.scheduler
import Scheduler
, Try_Userpass
16 from buildbot
.steps
.source
import SVN
17 from buildbot
.process
.factory
import s
18 from buildbot
.process
.process_twisted
import \
19 QuickTwistedBuildFactory
, \
20 FullTwistedBuildFactory
, \
21 TwistedReactorsBuildFactory
22 from buildbot
.status
import html
, words
, client
, mail
26 from extra_factory
import GoodTwistedBuildFactory
28 import private
# holds passwords
29 reload(private
) # make it possible to change the contents without a restart
31 BuildmasterConfig
= c
= {}
33 # I set really=False when testing this configuration at home
35 usePBChangeSource
= True
39 for bot
in private
.bot_passwords
.keys():
40 c
['bots'].append((bot
, private
.bot_passwords
[bot
]))
44 # the Twisted buildbot currently uses the contrib/svn_buildbot.py script.
45 # This makes a TCP connection to the ChangeMaster service to push Changes
46 # into the build master. The script is invoked by
47 # /svn/Twisted/hooks/post-commit, so it will only be run for things inside
48 # the Twisted repository. However, the standard SVN practice is to put the
49 # actual trunk in a subdirectory named "trunk/" (to leave room for
50 # "branches/" and "tags/"). We want to only pay attention to the trunk, so
51 # we use "trunk" as a prefix for the ChangeSource. This also strips off that
52 # prefix, so that the Builders all see sensible pathnames (which means they
53 # can do things like ignore the sandbox properly).
55 source
= PBChangeSource(prefix
="trunk/")
56 c
['sources'].append(source
)
59 ## configure the builders
62 # always build on trunk
63 svnurl
= "svn://svn.twistedmatrix.com/svn/Twisted/trunk"
64 source_update
= s(SVN
, svnurl
=svnurl
, mode
="update")
65 source_copy
= s(SVN
, svnurl
=svnurl
, mode
="copy")
66 source_export
= s(SVN
, svnurl
=svnurl
, mode
="export")
68 # for build-on-branch, we use these instead
69 baseURL
= "svn://svn.twistedmatrix.com/svn/Twisted/"
70 defaultBranch
= "trunk"
71 source_update
= s(SVN
, baseURL
=baseURL
, defaultBranch
=defaultBranch
,
73 source_copy
= s(SVN
, baseURL
=baseURL
, defaultBranch
=defaultBranch
,
75 source_export
= s(SVN
, baseURL
=baseURL
, defaultBranch
=defaultBranch
,
84 "-Wignore::PendingDeprecationWarning:distutils.command.build_py",
85 "-Wignore::PendingDeprecationWarning:distutils.command.build_ext",
89 b25compile_opts
= b24compile_opts
# FIXME
92 b1
= {'name': "quick",
95 'factory': QuickTwistedBuildFactory(source_update
,
96 python
=["python2.3", "python2.4"]),
101 "-Wignore::PendingDeprecationWarning:distutils.command.build_py",
102 "-Wignore::PendingDeprecationWarning:distutils.command.build_ext",
104 b23
= {'name': "debian-py2.3-select",
105 'slavename': "bot-exarkun",
106 'builddir': "full2.3",
107 'factory': FullTwistedBuildFactory(source_copy
,
108 python
=["python2.3", "-Wall"],
110 compileOpts
=b23compile_opts
,
116 b24
= {'name': "debian-py2.4-select",
117 'slavenames': ["bot-exarkun"],
118 'builddir': "full2.4",
119 'factory': FullTwistedBuildFactory(source_copy
,
120 python
=["python2.4", "-Wall"],
122 compileOpts
=b24compile_opts
,
128 'name': 'debian64-py2.4-select',
129 'slavenames': ['bot-idnar-debian64'],
130 'builddir': 'full2.4-debian64',
131 'factory': FullTwistedBuildFactory(source_copy
,
132 python
=["python2.4", "-Wall"],
133 compileOpts
=b24compile_opts
),
135 builders
.append(b24debian64
)
138 'name': 'debian-py2.5-select',
139 'slavenames': ['bot-idnar-debian'],
140 'builddir': 'full2.5-debian',
141 'factory': FullTwistedBuildFactory(source_copy
,
142 python
=["python2.5", "-Wall"],
143 compileOpts
=b24compile_opts
)}
144 builders
.append(b25debian
)
148 'name': 'suse-py2.5-select',
149 'slavenames': ['bot-scmikes-2.5'],
150 'builddir': 'bot-scmikes-2.5',
151 'factory': FullTwistedBuildFactory(source_copy
,
152 python
=["python2.5", "-Wall"],
153 compileOpts
=b24compile_opts
),
155 builders
.append(b25suse
)
157 reactors
= ['poll', 'epoll', 'gtk', 'gtk2']
158 b4
= {'name': "debian-py2.4-reactors",
160 'builddir': "reactors",
161 'factory': TwistedReactorsBuildFactory(source_copy
,
168 'name': 'osx-py2.4-select',
169 'slavenames': ['bot-exarkun-osx'],
170 'builddir': 'full2.4-exarkun-osx',
171 'factory': FullTwistedBuildFactory(source_copy
,
172 python
=["python2.4", "-Wall"],
173 compileOpts
=b24compile_opts
,
175 builders
.append(bosx24
)
178 'name': 'osx-py2.4-select-gc',
179 'slavenames': ['bot-exarkun-osx'],
180 'builddir': 'full2.4-force-gc-exarkun-osx',
181 'factory': GoodTwistedBuildFactory(source_copy
,
183 builders
.append(forcegc
)
186 # debuild is offline while we figure out how to build 2.0 .debs from SVN
187 # b3 = {'name': "debuild",
188 # 'slavename': "bot2",
189 # 'builddir': "debuild",
190 # 'factory': TwistedDebsBuildFactory(source_export,
191 # python="python2.4"),
193 # builders.append(b3)
195 b24w32_scmikes_select
= {
196 'name': "win32-py2.4-select",
197 'slavename': "bot-scmikes-win32",
198 'builddir': "W32-full2.4-scmikes-select",
199 'factory': TwistedReactorsBuildFactory(source_copy
,
201 compileOpts2
=["-c","mingw32"],
202 reactors
=["default"]),
204 builders
.append(b24w32_scmikes_select
)
206 b25w32_scmikes_select
= {
207 'name': "win32-py2.5-select",
208 'slavename': "bot-scmikes-win32-2.5",
209 'builddir': "W32-full2.5-scmikes-select",
210 'factory': TwistedReactorsBuildFactory(source_copy
,
212 compileOpts2
=["-c","mingw32"],
213 reactors
=["default"]),
215 builders
.append(b25w32_scmikes_select
)
218 'name': "win32-py2.4-er",
219 'slavename': "bot-win32-win32er",
220 'builddir': "W32-full2.4-win32er",
221 'factory': TwistedReactorsBuildFactory(source_copy
,
223 compileOpts2
=["-c","mingw32"],
226 builders
.append(b24w32_win32er
)
230 'name': "win32-py2.4-iocp",
231 'slavename': "bot-win32-iocp",
232 'builddir': "W32-full2.4-iocp",
233 'factory': TwistedReactorsBuildFactory(source_copy
,
238 builders
.append(b24w32_iocp
)
241 b24freebsd
= {'name': "freebsd-py2.4-select-kq",
242 'slavename': "bot-landonf",
243 'builddir': "freebsd-full2.4",
245 TwistedReactorsBuildFactory(source_copy
,
251 builders
.append(b24freebsd
)
254 osxtsr
= {'name': "osx-py2.4-tsr",
255 'slavename': "bot-exarkun-osx",
256 'builddir': "osx-tsr",
257 'factory': TwistedReactorsBuildFactory(
261 builders
.append(osxtsr
)
264 bpypyc
= {'name': 'osx-pypyc-select',
265 'slavename': 'bot-jerub-pypy',
266 'builddir': 'pypy-c',
267 'factory': TwistedReactorsBuildFactory(source_copy
,
269 reactors
=["default"])}
270 builders
.append(bpypyc
)
272 c
['builders'] = builders
274 # now set up the schedulers. We do this after setting up c['builders'] so we
275 # can auto-generate a list of all of them.
276 all_builders
= [b
['name'] for b
in c
['builders']]
278 all_builders
.remove("quick")
280 ## configure the schedulers
281 s_quick
= Scheduler(name
="quick", branch
=None, treeStableTimer
=30,
282 builderNames
=["quick"])
283 s_try
= Try_Userpass("try", all_builders
, port
=9989,
284 userpass
=private
.try_users
)
287 for i
, builderName
in enumerate(all_builders
):
288 s_all
.append(Scheduler(name
="all-" + builderName
,
289 branch
=None, builderNames
=[builderName
],
290 treeStableTimer
=(5 * 60 + i
* 30)))
291 c
['schedulers'] = [s_quick
, s_try
] + s_all
295 # configure other status things
297 c
['slavePortnum'] = 9987
300 p
= os
.path
.expanduser("~/.twistd-web-pb")
301 c
['status'].append(html
.Waterfall(distrib_port
=p
))
303 c
['status'].append(html
.Waterfall(http_port
=9988))
305 c
['status'].append(words
.IRC(host
="irc.freenode.net",
307 channels
=["twisted"]))
309 c
['debugPassword'] = private
.debugPassword
310 #c['interlocks'] = [("do-deb", ["full-2.2"], ["debuild"])]
311 if hasattr(private
, "manhole"):
312 from buildbot
import manhole
313 c
['manhole'] = manhole
.PasswordManhole(*private
.manhole
)
314 c
['status'].append(client
.PBListener(9936))
315 m
= mail
.MailNotifier(fromaddr
="buildbot@twistedmatrix.com",
316 builders
=["quick", "debian-py2.3-select"],
317 sendToInterestedUsers
=True,
318 extraRecipients
=["warner@lothar.com"],
321 c
['status'].append(m
)
322 c
['projectName'] = "Twisted"
323 c
['projectURL'] = "http://twistedmatrix.com/"
324 c
['buildbotURL'] = "http://twistedmatrix.com/buildbot/"