Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/buildbot/docs/examples/twisted_master.cfg
blob: 7185ef354414e9ea7b1e4fa6f96117df70228499 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
#! /usr/bin/python

# NOTE: this configuration file is from the buildbot-0.7.5 era or earlier. It
# has not been brought up-to-date with the standards of buildbot-0.7.6 . For
# examples of modern usage, please see hello.cfg, or the sample.cfg which is
# installed when you run 'buildbot create-master'.

# This configuration file is described in $BUILDBOT/docs/config.xhtml

# This is used (with online=True) to run the Twisted Buildbot at
# http://www.twistedmatrix.com/buildbot/ . Passwords and other secret
# information are loaded from a neighboring file called 'private.py'.

import sys
sys.path.append('/home/buildbot/BuildBot/support-master')

import os.path

from buildbot.changes.pb import PBChangeSource
from buildbot.scheduler import Scheduler, Try_Userpass
from buildbot.steps.source import SVN
from buildbot.process.factory import s
from buildbot.process.process_twisted import \
     QuickTwistedBuildFactory, \
     FullTwistedBuildFactory, \
     TwistedReactorsBuildFactory
from buildbot.status import html, words, client, mail

import extra_factory
reload(extra_factory)
from extra_factory import GoodTwistedBuildFactory

import private # holds passwords
reload(private) # make it possible to change the contents without a restart

BuildmasterConfig = c = {}

# I set really=False when testing this configuration at home
really = True
usePBChangeSource = True


c['bots'] = []
for bot in private.bot_passwords.keys():
    c['bots'].append((bot, private.bot_passwords[bot]))

c['sources'] = []

# the Twisted buildbot currently uses the contrib/svn_buildbot.py script.
# This makes a TCP connection to the ChangeMaster service to push Changes
# into the build master. The script is invoked by
# /svn/Twisted/hooks/post-commit, so it will only be run for things inside
# the Twisted repository. However, the standard SVN practice is to put the
# actual trunk in a subdirectory named "trunk/" (to leave room for
# "branches/" and "tags/"). We want to only pay attention to the trunk, so
# we use "trunk" as a prefix for the ChangeSource. This also strips off that
# prefix, so that the Builders all see sensible pathnames (which means they
# can do things like ignore the sandbox properly).

source = PBChangeSource(prefix="trunk/")
c['sources'].append(source)


## configure the builders

if 0:
    # always build on trunk
    svnurl = "svn://svn.twistedmatrix.com/svn/Twisted/trunk"
    source_update = s(SVN, svnurl=svnurl, mode="update")
    source_copy = s(SVN, svnurl=svnurl, mode="copy")
    source_export = s(SVN, svnurl=svnurl, mode="export")
else:
    # for build-on-branch, we use these instead
    baseURL = "svn://svn.twistedmatrix.com/svn/Twisted/"
    defaultBranch = "trunk"
    source_update = s(SVN, baseURL=baseURL, defaultBranch=defaultBranch,
                      mode="update")
    source_copy = s(SVN, baseURL=baseURL, defaultBranch=defaultBranch,
                    mode="copy")
    source_export = s(SVN, baseURL=baseURL, defaultBranch=defaultBranch,
                      mode="export")


builders = []



b24compile_opts = [
    "-Wignore::PendingDeprecationWarning:distutils.command.build_py",
    "-Wignore::PendingDeprecationWarning:distutils.command.build_ext",
    ]


b25compile_opts = b24compile_opts # FIXME


b1 = {'name': "quick",
      'slavename': "bot1",
      'builddir': "quick",
      'factory': QuickTwistedBuildFactory(source_update,
                                          python=["python2.3", "python2.4"]),
      }
builders.append(b1)

b23compile_opts = [
    "-Wignore::PendingDeprecationWarning:distutils.command.build_py",
    "-Wignore::PendingDeprecationWarning:distutils.command.build_ext",
    ]
b23 = {'name': "debian-py2.3-select",
       'slavename': "bot-exarkun",
       'builddir': "full2.3",
       'factory': FullTwistedBuildFactory(source_copy,
                                          python=["python2.3", "-Wall"],
                                          # use -Werror soon
                                          compileOpts=b23compile_opts,
                                          processDocs=1,
                                          runTestsRandomly=1),
       }
builders.append(b23)

b24 = {'name': "debian-py2.4-select",
       'slavenames': ["bot-exarkun"],
       'builddir': "full2.4",
       'factory': FullTwistedBuildFactory(source_copy,
                                          python=["python2.4", "-Wall"],
                                          # use -Werror soon
                                          compileOpts=b24compile_opts,
                                          runTestsRandomly=1),
       }
builders.append(b24)

b24debian64 = {
    'name': 'debian64-py2.4-select',
    'slavenames': ['bot-idnar-debian64'],
    'builddir': 'full2.4-debian64',
    'factory': FullTwistedBuildFactory(source_copy,
                                       python=["python2.4", "-Wall"],
                                       compileOpts=b24compile_opts),
    }
builders.append(b24debian64)

b25debian = {
    'name': 'debian-py2.5-select',
    'slavenames': ['bot-idnar-debian'],
    'builddir': 'full2.5-debian',
    'factory': FullTwistedBuildFactory(source_copy,
                                       python=["python2.5", "-Wall"],
                                       compileOpts=b24compile_opts)}
builders.append(b25debian)


b25suse = {
    'name': 'suse-py2.5-select',
    'slavenames': ['bot-scmikes-2.5'],
    'builddir': 'bot-scmikes-2.5',
    'factory': FullTwistedBuildFactory(source_copy,
                                       python=["python2.5", "-Wall"],
                                       compileOpts=b24compile_opts),
    }
builders.append(b25suse)

reactors = ['poll', 'epoll', 'gtk', 'gtk2']
b4 = {'name': "debian-py2.4-reactors",
      'slavename': "bot2",
      'builddir': "reactors",
      'factory': TwistedReactorsBuildFactory(source_copy,
                                             python="python2.4",
                                             reactors=reactors),
      }
builders.append(b4)

bosx24 = {
    'name': 'osx-py2.4-select',
    'slavenames': ['bot-exarkun-osx'],
    'builddir': 'full2.4-exarkun-osx',
    'factory': FullTwistedBuildFactory(source_copy,
                                       python=["python2.4", "-Wall"],
                                       compileOpts=b24compile_opts,
                                       runTestsRandomly=1)}
builders.append(bosx24)

forcegc = {
    'name': 'osx-py2.4-select-gc',
    'slavenames': ['bot-exarkun-osx'],
    'builddir': 'full2.4-force-gc-exarkun-osx',
    'factory': GoodTwistedBuildFactory(source_copy,
                                       python="python2.4")}
builders.append(forcegc)


# debuild is offline while we figure out how to build 2.0 .debs from SVN
# b3 = {'name': "debuild",
#       'slavename': "bot2",
#       'builddir': "debuild",
#       'factory': TwistedDebsBuildFactory(source_export,
#                                          python="python2.4"),
#       }
# builders.append(b3)

b24w32_scmikes_select = {
          'name': "win32-py2.4-select",
          'slavename': "bot-scmikes-win32",
          'builddir': "W32-full2.4-scmikes-select",
          'factory': TwistedReactorsBuildFactory(source_copy,
                                                 python="python",
                                                 compileOpts2=["-c","mingw32"],
                                                 reactors=["default"]),
          }
builders.append(b24w32_scmikes_select)

b25w32_scmikes_select = {
          'name': "win32-py2.5-select",
          'slavename': "bot-scmikes-win32-2.5",
          'builddir': "W32-full2.5-scmikes-select",
          'factory': TwistedReactorsBuildFactory(source_copy,
                                                 python="python",
                                                 compileOpts2=["-c","mingw32"],
                                                 reactors=["default"]),
          }
builders.append(b25w32_scmikes_select)

b24w32_win32er = {
          'name': "win32-py2.4-er",
          'slavename': "bot-win32-win32er",
          'builddir': "W32-full2.4-win32er",
          'factory': TwistedReactorsBuildFactory(source_copy,
                                                 python="python",
                                                 compileOpts2=["-c","mingw32"],
                                                 reactors=["win32"]),
          }
builders.append(b24w32_win32er)


b24w32_iocp = {
          'name': "win32-py2.4-iocp",
          'slavename': "bot-win32-iocp",
          'builddir': "W32-full2.4-iocp",
          'factory': TwistedReactorsBuildFactory(source_copy,
                                                 python="python",
                                                 compileOpts2=[],
                                                 reactors=["iocp"]),
          }
builders.append(b24w32_iocp)


b24freebsd = {'name': "freebsd-py2.4-select-kq",
              'slavename': "bot-landonf",
              'builddir': "freebsd-full2.4",
              'factory':
              TwistedReactorsBuildFactory(source_copy,
                                          python="python2.4",
                                          reactors=["default",
                                                    "kqueue",
                                                    ]),
              }
builders.append(b24freebsd)


osxtsr = {'name': "osx-py2.4-tsr",
          'slavename': "bot-exarkun-osx",
          'builddir': "osx-tsr",
          'factory': TwistedReactorsBuildFactory(
              source_copy,
              python="python2.4",
              reactors=["tsr"])}
builders.append(osxtsr)


bpypyc = {'name': 'osx-pypyc-select',
          'slavename': 'bot-jerub-pypy',
          'builddir': 'pypy-c',
          'factory': TwistedReactorsBuildFactory(source_copy,
						 python="pypy-c",
						 reactors=["default"])}
builders.append(bpypyc)

c['builders'] = builders

# now set up the schedulers. We do this after setting up c['builders'] so we
# can auto-generate a list of all of them.
all_builders = [b['name'] for b in c['builders']]
all_builders.sort()
all_builders.remove("quick")

## configure the schedulers
s_quick = Scheduler(name="quick", branch=None, treeStableTimer=30,
                    builderNames=["quick"])
s_try = Try_Userpass("try", all_builders, port=9989,
                     userpass=private.try_users)

s_all = []
for i, builderName in enumerate(all_builders):
    s_all.append(Scheduler(name="all-" + builderName,
                           branch=None, builderNames=[builderName],
                           treeStableTimer=(5 * 60 + i * 30)))
c['schedulers'] = [s_quick, s_try] + s_all



# configure other status things

c['slavePortnum'] = 9987
c['status'] = []
if really:
    p = os.path.expanduser("~/.twistd-web-pb")
    c['status'].append(html.Waterfall(distrib_port=p))
else:
    c['status'].append(html.Waterfall(http_port=9988))
if really:
    c['status'].append(words.IRC(host="irc.freenode.net",
                                 nick='buildbot',
                                 channels=["twisted"]))

c['debugPassword'] = private.debugPassword
#c['interlocks'] = [("do-deb", ["full-2.2"], ["debuild"])]
if hasattr(private, "manhole"):
    from buildbot import manhole
    c['manhole'] = manhole.PasswordManhole(*private.manhole)
c['status'].append(client.PBListener(9936))
m = mail.MailNotifier(fromaddr="buildbot@twistedmatrix.com",
                      builders=["quick", "debian-py2.3-select"],
                      sendToInterestedUsers=True,
		      extraRecipients=["warner@lothar.com"],
		      mode="problem",
		      )
c['status'].append(m)
c['projectName'] = "Twisted"
c['projectURL'] = "http://twistedmatrix.com/"
c['buildbotURL'] = "http://twistedmatrix.com/buildbot/"