# import/reload dance so that reconfigs work
# buildbotcustom.misc has to be imported/reloaded prior to config
# so that the fastRegexes don't get reset
import buildbotcustom.misc
import config
reload(buildbotcustom.misc)
reload(config)
from config import SLAVES
from buildbotcustom.misc import generateCCBranchObjects
ACTIVE_BRANCHES = ['comm-central-trunk', 'comm-1.9.1']
L10N_SLAVES = {
'linux': SLAVES['linux'],
'linux64': SLAVES['linux64'],
'win32': SLAVES['win32'],
'macosx': SLAVES['macosx'],
'macosx64': SLAVES['macosx64'],
}
execfile("master-main.cfg")
# Required for sendchange
from buildbot.changes.pb import PBChangeSource
c['change_source'].append(PBChangeSource())
# 'slavePortnum' defines the TCP port to listen on. This must match the value
# configured into the buildslaves (with their --master option)
c['slavePortnum'] = 9010
####### STATUS TARGETS
from buildbot.status import html
c['status'].append(html.WebStatus(
http_port=8010, allowForce=True
))
c['buildbotURL'] = 'http://cb-seamonkey-linuxmaster-01.mozilla.org:8010/'
for branch in ACTIVE_BRANCHES:
branchObjects = generateCCBranchObjects(BRANCHES[branch], branch)
c['builders'].extend(branchObjects['builders'])
c['schedulers'].extend(branchObjects['schedulers'])
c['change_source'].extend(branchObjects['change_source'])
c['status'].extend(branchObjects['status'])
####### 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)
# Give the release builders priority over other builders
def prioritizeBuilders(botmaster, builders):
def sortkey(builder):
if builder.builder_status.category == 'release':
return 0, builder.getOldestRequestTime()
else:
return 1, builder.getOldestRequestTime()
builders.sort(key=sortkey)
return builders
c['prioritizeBuilders'] = prioritizeBuilders
c['mergeRequests'] = buildbotcustom.misc.mergeRequests
# c is shorthand for BuildmasterConfig, so make sure they still refer to the
# same thing
assert c is BuildmasterConfig