This repository has been archived by the owner on Feb 2, 2019. It is now read-only.
/
master.cfg
493 lines (444 loc) · 19.2 KB
/
master.cfg
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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
# -*- python -*-
# ex: set syntax=python:
# Shorthand
c = BuildmasterConfig = {}
# most of the config is in an external file
import config
reload(config)
from config import *
####### BUILDSLAVES
import BuildSlaves
reload(BuildSlaves)
from BuildSlaves import SlavePasswords
# 'slavePortnum' defines the TCP port to listen on. This must match the value
# configured into the buildslaves (with their --master option)
c['slavePortnum'] = 9010
from buildbot.buildslave import BuildSlave
c['slaves'] = []
for platform, names in SLAVES.items():
for name in names:
c['slaves'].append(BuildSlave(name, SlavePasswords[platform], max_builds=1))
import buildbot.status.tinderbox
reload(buildbot.status.tinderbox)
from buildbot.scheduler import Nightly
from buildbot.status.tinderbox import TinderboxMailNotifier
from buildbot.steps.shell import WithProperties
import buildbotcustom.misc
import buildbotcustom.changes.hgpoller
import buildbotcustom.process.factory
import buildbotcustom.scheduler
reload(buildbotcustom.misc)
reload(buildbotcustom.changes.hgpoller)
reload(buildbotcustom.process.factory)
reload(buildbotcustom.scheduler)
from buildbotcustom.misc import isHgPollerTriggered
from buildbotcustom.changes.hgpoller import HgPoller, HgAllLocalesPoller
from buildbotcustom.process.factory import CCNightlyBuildFactory, \
CCNightlyRepackFactory, CCUnittestBuildFactory, CodeCoverageFactory
from buildbotcustom.scheduler import MozScheduler
# l10n parallelization logic
import buildbotcustom.log
import buildbotcustom.l10n
reload(buildbotcustom.log)
reload(buildbotcustom.l10n)
from buildbotcustom.l10n import NightlyL10n, Scheduler as SchedulerL10n
c['change_source'] = []
c['schedulers'] = []
c['builders'] = []
c['status'] = []
for name in sorted(BRANCHES.keys()):
# shorthand
branch = BRANCHES[name]
builders = []
unittestBuilders = []
nightlyBuilders = []
weeklyBuilders = []
# This dict provides a mapping between en-US nightly scheduler names
# and l10n nightly scheduler names. It's filled out just below here.
l10nNightlyBuilders = {}
# generate a list of builders, nightly builders (names must be different)
# for easy access
for platform in branch['platforms'].keys():
base_name = branch['platforms'][platform]['base_name']
builders.append('%s build' % base_name)
# Skip l10n, unit tests and nightlies for debug builds
if platform.find('debug') >= 0:
continue
builder = '%s nightly' % base_name
nightlyBuilders.append(builder)
if branch['enable_l10n'] and platform in ('linux','win32','macosx'):
l10nNightlyBuilders[builder] = {}
l10nNightlyBuilders[builder]['tree'] = branch['l10n_tree']
l10nNightlyBuilders[builder]['l10n_builder'] = \
'%s %s %s l10n' % (branch['brand_name'], name, platform)
l10nNightlyBuilders[builder]['platform'] = platform
if branch['enable_unittests'] and platform in ('linux','win32','macosx'):
unittestBuilders.append('%s unit test' % base_name)
if branch['enable_codecoverage'] and platform in ('linux',):
weeklyBuilders.append('%s code coverage' % branch['platforms'][platform]['base_name'])
# Currently, each branch goes to a different tree
# If this changes in the future this may have to be
# moved out of the loop
c['status'].append(TinderboxMailNotifier(
fromaddr="seamonkey.buildbot@build.mozilla.org",
tree=branch['tinderbox_tree'],
extraRecipients=["tinderbox-daemon@tinderbox.mozilla.org"],
relayhost="mail.build.mozilla.org",
builders=builders,
logCompression="bzip2"
))
# Separate notifier for nightlies, since they show the binaryurl (D link)
c['status'].append(TinderboxMailNotifier(
fromaddr="seamonkey.buildbot@build.mozilla.org",
tree=branch['tinderbox_tree'],
extraRecipients=["tinderbox-daemon@tinderbox.mozilla.org"],
relayhost="mail.build.mozilla.org",
builders=nightlyBuilders,
logCompression="bzip2",
binaryURL="http://ftp.mozilla.org/pub/mozilla.org/%s/nightly/latest-%s/" % (branch['product_name'], name)
))
# Separate notifier for unittests, since they need to be run through
# the unittest errorparser
c['status'].append(TinderboxMailNotifier(
fromaddr="seamonkey.buildbot@build.mozilla.org",
tree=branch['tinderbox_tree'],
extraRecipients=["tinderbox-daemon@tinderbox.mozilla.org"],
relayhost="mail.build.mozilla.org",
builders=unittestBuilders,
logCompression="bzip2",
errorparser="unittest"
))
# Weekly builds (currently only code coverage) go to the SeaMonkey-Ports tree
c['status'].append(TinderboxMailNotifier(
fromaddr="seamonkey.buildbot@build.mozilla.org",
tree="SeaMonkey-Ports",
extraRecipients=["tinderbox-daemon@tinderbox.mozilla.org"],
relayhost="mail.build.mozilla.org",
builders=weeklyBuilders,
logCompression="bzip2",
errorparser="unittest"
))
if branch['enable_l10n']:
l10n_builders = []
for b in l10nNightlyBuilders:
l10n_builders.append(l10nNightlyBuilders[b]['l10n_builder'])
# This notifies all l10n related build objects to Mozilla-l10n
c['status'].append(TinderboxMailNotifier(
fromaddr="seamonkey.buildbot@build.mozilla.org",
tree="Mozilla-l10n",
extraRecipients=["tinderbox-daemon@tinderbox.mozilla.org"],
relayhost="mail.build.mozilla.org",
logCompression="bzip2",
builders=l10n_builders,
binaryURL="http://ftp.mozilla.org/pub/mozilla.org/%s/nightly/latest-%s-l10n/" % (branch['product_name'], name)
))
# We only want the builds from the specified builders
# since their builds have a build property called "locale"
c['status'].append(TinderboxMailNotifier(
fromaddr="seamonkey.buildbot@build.mozilla.org",
tree=WithProperties("Mozilla-l10n-%(locale)s"),
extraRecipients=["tinderbox-daemon@tinderbox.mozilla.org"],
relayhost="mail.build.mozilla.org",
logCompression="bzip2",
builders=l10n_builders,
binaryURL="http://ftp.mozilla.org/pub/mozilla.org/%s/nightly/latest-%s-l10n/" % (branch['product_name'], name)
))
# change sources
c['change_source'].append(HgPoller(
hgURL=HGURL,
branch=branch['repo_path'],
pushlogUrlOverride='%s%s/pushlog' % (HGURL, branch['repo_path']),
pollInterval=1*60
))
c['change_source'].append(HgPoller(
hgURL=HGURL,
branch=branch['repo_path'],
pushlogUrlOverride='%s%s/pushlog' % (HGURL, branch['mozilla_repo_path']),
pollInterval=1*60
))
if branch['enable_l10n']:
hg_all_locales_poller = HgAllLocalesPoller(hgURL = HGURL,
repositoryIndex = branch['l10n_repo_path'],
pollInterval = 5*60)
hg_all_locales_poller.parallelRequests = 1
c['change_source'].append(hg_all_locales_poller)
# schedulers
# this one gets triggered by the HG Poller
c['schedulers'].append(MozScheduler(
name=name,
branch=branch['repo_path'],
treeStableTimer=3*60,
idleTimeout=branch.get('idle_timeout', None),
builderNames=builders + unittestBuilders,
fileIsImportant=lambda c: isHgPollerTriggered(c, HGURL)
))
# Now, setup the nightly en-US schedulers and maybe,
# their downstream l10n ones
for builder in nightlyBuilders:
nightly_scheduler=Nightly(
name=builder,
branch=branch['repo_path'],
hour=[0],
builderNames=[builder]
)
c['schedulers'].append(nightly_scheduler)
if branch['enable_l10n'] and builder in l10nNightlyBuilders:
l10n_builder = l10nNightlyBuilders[builder]['l10n_builder']
platform = l10nNightlyBuilders[builder]['platform']
tree = l10nNightlyBuilders[builder]['tree']
c['schedulers'].append(NightlyL10n(
name=l10n_builder,
platform=platform,
tree=tree,
hour=[4],
builderNames=[l10n_builder],
repoType='hg',
branch=branch['repo_path'],
baseTag='default',
localesFile=branch['allLocalesFile']
))
for builder in weeklyBuilders:
weekly_scheduler=Nightly(
name=builder,
branch=branch['repo_path'],
dayOfWeek=5, # Saturday
hour=[0],
builderNames=[builder],
)
c['schedulers'].append(weekly_scheduler)
for platform in sorted(branch['platforms'].keys()):
# shorthand
pf = branch['platforms'][platform]
leakTest = False
codesighs = True
uploadPackages = True
uploadSymbols = False
if platform.find('-debug') > -1:
leakTest = True
codesighs = False
uploadPackages = False
if platform.find('win32') > -1 or platform.find('64') > -1:
codesighs = False
if 'upload_symbols' in pf and pf['upload_symbols']:
uploadSymbols = True
buildSpace = pf.get('build_space', DEFAULT_BUILD_SPACE)
clobberTime = pf.get('clobber_time', DEFAULT_CLOBBER_TIME)
mozilla2_dep_factory = CCNightlyBuildFactory(
env=pf['env'],
objdir=pf['platform_objdir'],
platform=platform,
hgHost=HGHOST,
repoPath=branch['repo_path'],
mozRepoPath=branch['mozilla_repo_path'],
buildToolsRepoPath=BUILD_TOOLS_REPO_PATH,
configRepoPath=CONFIG_REPO_PATH,
configSubDir=CONFIG_SUBDIR,
profiledBuild=pf['profiled_build'],
productName=branch['product_name'],
mozconfig=pf['mozconfig_dep'],
branchName=name,
stageServer=STAGE_SERVER,
stageUsername=STAGE_USERNAME,
stageGroup=STAGE_GROUP,
stageSshKey=STAGE_SSH_KEY,
stageBasePath=STAGE_BASE_PATH,
graphServer=GRAPH_SERVER,
graphSelector=GRAPH_SELECTOR,
graphBranch=branch['major_version'],
baseName=pf['base_name'],
leakTest=leakTest,
codesighs=codesighs,
uploadPackages=uploadPackages,
uploadSymbols=False,
buildSpace=buildSpace,
clobberURL=BASE_CLOBBER_URL,
clobberTime=clobberTime,
buildsBeforeReboot=pf['builds_before_reboot'],
talosMasters=TALOS_MASTERS,
)
mozilla2_dep_builder = {
'name': '%s build' % pf['base_name'],
'slavenames': pf['slaves'],
'builddir': '%s-%s' % (name, platform),
'factory': mozilla2_dep_factory,
'category': name,
}
c['builders'].append(mozilla2_dep_builder)
# skip nightlies for debug builds
if platform.find('debug') > -1:
continue
nightly_builder = '%s nightly' % pf['base_name']
mozilla2_nightly_factory = CCNightlyBuildFactory(
env=pf['env'],
objdir=pf['platform_objdir'],
platform=platform,
hgHost=HGHOST,
repoPath=branch['repo_path'],
mozRepoPath=branch['mozilla_repo_path'],
buildToolsRepoPath=BUILD_TOOLS_REPO_PATH,
configRepoPath=CONFIG_REPO_PATH,
configSubDir=CONFIG_SUBDIR,
profiledBuild=pf['profiled_build'],
productName=branch['product_name'],
mozconfig=pf['mozconfig'],
branchName=name,
stageServer=STAGE_SERVER,
stageUsername=STAGE_USERNAME,
stageGroup=STAGE_GROUP,
stageSshKey=STAGE_SSH_KEY,
stageBasePath=STAGE_BASE_PATH,
codesighs=False,
uploadPackages=uploadPackages,
uploadSymbols=uploadSymbols,
nightly=True,
createSnippet=branch['create_snippet'],
ausBaseUploadDir=branch['aus2_base_upload_dir'],
updatePlatform=pf['update_platform'],
downloadBaseURL=DOWNLOAD_BASE_URL,
ausUser=AUS2_USER,
ausHost=AUS2_HOST,
buildSpace=buildSpace,
clobberURL=BASE_CLOBBER_URL,
clobberTime=clobberTime,
buildsBeforeReboot=pf['builds_before_reboot'],
talosMasters=TALOS_MASTERS,
)
mozilla2_nightly_builder = {
'name': nightly_builder,
'slavenames': pf['slaves'],
'builddir': '%s-%s-nightly' % (name, platform),
'factory': mozilla2_nightly_factory,
'category': name,
}
c['builders'].append(mozilla2_nightly_builder)
if branch['enable_l10n']:
if platform in ('linux','win32','macosx'):
mozilla2_l10n_nightly_factory = CCNightlyRepackFactory(
hgHost=HGHOST,
tree=branch['l10n_tree'],
project=branch['product_name'],
appName=branch['app_name'],
enUSBinaryURL=branch['enUS_binaryURL'],
stageServer=STAGE_SERVER,
stageUsername=STAGE_USERNAME,
stageSshKey=STAGE_SSH_KEY,
branchName=name,
repoPath=branch['repo_path'],
mozRepoPath=branch['mozilla_repo_path'],
l10nRepoPath=branch['l10n_repo_path'],
buildToolsRepoPath=BUILD_TOOLS_REPO_PATH,
compareLocalesRepoPath=COMPARE_LOCALES_REPO_PATH,
compareLocalesTag=COMPARE_LOCALES_TAG,
buildSpace=2,
clobberURL=BASE_CLOBBER_URL,
clobberTime=clobberTime,
)
mozilla2_l10n_nightly_builder = {
'name': l10nNightlyBuilders[nightly_builder]['l10n_builder'],
'slavenames': L10N_SLAVES[platform],
'builddir': '%s-%s-l10n-nightly' % (name, platform),
'factory': mozilla2_l10n_nightly_factory,
'category': name,
}
c['builders'].append(mozilla2_l10n_nightly_builder)
if branch['enable_unittests']:
if platform in ('linux','win32','macosx'):
runA11y = True
if platform == 'macosx':
runA11y = branch['enable_mac_a11y']
unittest_factory = CCUnittestBuildFactory(
platform=platform,
productName=branch['product_name'],
config_repo_path=CONFIG_REPO_PATH,
config_dir=CONFIG_SUBDIR,
objdir=OBJDIR_UNITTESTS,
branchName=name,
brandName=branch['brand_name'],
mochitest_leak_threshold=pf['mochitest_leak_threshold'],
mochichrome_leak_threshold=pf['mochichrome_leak_threshold'],
mochibrowser_leak_threshold=pf['mochibrowser_leak_threshold'],
crashtest_leak_threshold=pf['crashtest_leak_threshold'],
hgHost=HGHOST,
repoPath=branch['repo_path'],
mozRepoPath=branch['mozilla_repo_path'],
buildToolsRepoPath=BUILD_TOOLS_REPO_PATH,
buildSpace=branch['unittest_build_space'],
clobberURL=BASE_CLOBBER_URL,
clobberTime=clobberTime,
buildsBeforeReboot=pf['builds_before_reboot'],
stageServer=STAGE_SERVER,
stageUsername=STAGE_USERNAME,
stageSshKey=STAGE_SSH_KEY,
uploadPackages=True,
run_a11y=runA11y
)
unittest_builder = {
'name': '%s unit test' % pf['base_name'],
'slavenames': pf['slaves'],
'builddir': '%s-%s-unittest' % (name, platform),
'factory': unittest_factory,
'category': name,
}
c['builders'].append(unittest_builder)
if branch['enable_codecoverage']:
# We only do code coverage builds on linux right now
if platform == 'linux':
codecoverage_factory = CodeCoverageFactory(
platform=platform,
productName=branch['product_name'],
config_repo_path=CONFIG_REPO_PATH,
config_dir=CONFIG_SUBDIR,
objdir=OBJDIR_UNITTESTS,
hgHost=HGHOST,
branchName=name,
repoPath=branch['repo_path'],
buildToolsRepoPath=BUILD_TOOLS_REPO_PATH,
buildSpace=5,
clobberURL=BASE_CLOBBER_URL,
clobberTime=clobberTime,
buildsBeforeReboot=pf['builds_before_reboot'],
stageServer=STAGE_SERVER,
stageUsername=STAGE_USERNAME,
stageSshKey=STAGE_SSH_KEY,
)
codecoverage_builder = {
'name': '%s code coverage' % pf['base_name'],
'slavenames': pf['slaves'],
'builddir': '%s-%s-codecoverage' % (name, platform),
'factory': codecoverage_factory,
'category': name,
}
c['builders'].append(codecoverage_builder)
####### STATUS TARGETS
from buildbot.status import html
c['status'].append(html.WebStatus(
http_port=8010, allowForce=True
))
####### L10n Scheduler with multiple dispatchers
# for debugging purposes of the repack on locale change system
buildbotcustom.log.init(
scheduler = buildbotcustom.log.DEBUG,
dispatcher = buildbotcustom.log.DEBUG
)
s = SchedulerL10n("l10n", "l10nbuilds.ini")
c['schedulers'].append(s)
####### Release Automation
import release_master
reload(release_master)
c['builders'].extend(release_master.builders)
c['schedulers'].extend(release_master.schedulers)
c['change_source'].extend(release_master.change_source)
c['status'].extend(release_master.status)
####### PROJECT IDENTITY
# the 'projectName' string will be used to describe the project that this
# buildbot is working on. For example, it is used as the title of the
# waterfall HTML page. The 'projectURL' string will be used to provide a link
# from buildbot HTML pages to your project's home page.
c['projectName'] = "SeaMonkey 2"
c['projectURL'] = "http://wiki.mozilla.org/SeaMonkey:hg-based_build"
# the 'buildbotURL' string should point to the location where the buildbot's
# internal web server (usually the html.Waterfall page) is visible. This
# typically uses the port number set in the Waterfall 'status' entry, but
# with an externally-visible host name which the buildbot cannot figure out
# without some help.
c['buildbotURL'] = "http://cb-sea-linux-tbox.sj.mozilla.com:8010/"