blob: 173cfb97a14a315c7e6cb6e668686c15ebbd8ad9 [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# These modules come from scripts/master, which must be in the PYTHONPATH.
from master import master_utils
from master import slaves_list
from master.builders_pools import BuildersPools
from master.factory import annotator_factory
from buildbot.schedulers.basic import SingleBranchScheduler
import config
import master_site_config
ActiveMaster = master_site_config.MojoTryServer
m_annotator = annotator_factory.AnnotatorFactory()
c = BuildmasterConfig = {}
c['change_source'] = []
c['schedulers'] = []
c['builders'] = []
c['status'] = []
builders = [
'Mojo Linux Try',
'Mojo Linux (dbg) Try',
'Mojo Android Builder Try',
'Mojo Android Builder (dbg) Try',
'Mojo Linux ASan Try',
'Mojo Android Builder Tests (dbg) Try',
]
for builder_name in builders:
c['builders'].append({
'name': builder_name,
'factory': m_annotator.BaseFactory('mojo'),
'slavebuilddir': 'mojo',
})
config.DatabaseSetup(c)
c['logCompressionLimit'] = False
c['projectName'] = ActiveMaster.project_name
c['projectURL'] = config.Master.project_url
# Must come before AutoSetupMaster().
c['buildbotURL'] = ActiveMaster.buildbot_url
# Associate the slaves to the manual builders. The configuration is in
# slaves.cfg.
slaves = slaves_list.SlavesList('slaves.cfg', 'MojoTryServer')
for builder in c['builders']:
builder['slavenames'] = slaves.GetSlavesName(builder=builder['name'])
# The 'slaves' list defines the set of allowable buildslaves. List all the
# slaves registered to a builder. Remove dupes.
c['slaves'] = master_utils.AutoSetupSlaves(
c['builders'],
config.Master.GetBotPassword())
master_utils.VerifySetup(c, slaves)
# Adds common status and tools to this master.
master_utils.AutoSetupMaster(c, ActiveMaster,
public_html='../master.chromium/public_html',
templates=['../master.chromium/templates'],
enable_http_status_push=ActiveMaster.is_production_host)
# Do it at the end to override values set by AutoSetupMaster, the default is
# too low. Must keep at least a few days worth of builds.
c['buildHorizon'] = 3000
c['logHorizon'] = 3000
# Must be at least 2x the number of slaves.
c['eventHorizon'] = 200