blob: 88201088e3e171f52d1a5ad2a674fa94e75bdf89 [file] [log] [blame]
# -*- python -*-
# ex: set syntax=python:
# 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.
# READ THIS:
# See http://dev.chromium.org/developers/testing/chromium-build-infrastructure
import os
import socket
# These modules come from scripts, 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 remote_run_factory
import config
import master_site_config
ActiveMaster = master_site_config.BlinkTryServer
MAIL_NOTIFIER = ActiveMaster.is_production_host
# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}
config.DatabaseSetup(c)
c['change_source'] = []
# Avoid merging requests.
c['mergeRequests'] = lambda *_: False
def m_remote_run_chromium_src(recipe, **kwargs):
props = {'path_config': 'kitchen'}
props.update(kwargs.pop('properties', {}))
return remote_run_factory.RemoteRunFactory(
active_master=ActiveMaster,
repository='https://chromium.googlesource.com/chromium/src.git',
recipe=recipe,
factory_properties=props,
use_gitiles=True,
**kwargs)
c['builders'] = []
for platform in ['linux_precise', 'mac10.9', 'win7']:
for target in ['_dbg', '_compile_dbg', '_compile_rel', '_rel']:
c['builders'].append({
'name': '%s_blink%s' % (platform, target),
'factory': m_remote_run_chromium_src('chromium_trybot', timeout=3600),
'slavebuilddir': '%s_layout' % platform
})
for platform in ['mac10.10', 'mac10.11', 'mac10.11_retina',
'win10', 'linux_trusty']:
c['builders'].append({
'name': '%s_blink_rel' % platform,
'factory': m_remote_run_chromium_src('chromium_trybot', timeout=3600),
'slavebuilddir': '%s_layout' % platform
})
slaves = slaves_list.SlavesList('slaves.cfg', 'BlinkTryServer')
for builder in c['builders']:
builder['slavenames'] = slaves.GetSlavesName(builder=builder['name'])
builder.setdefault('auto_reboot', ActiveMaster.is_production_host)
c['slaves'] = master_utils.AutoSetupSlaves(c['builders'],
config.Master.GetBotPassword())
master_utils.VerifySetup(c, slaves)
c['schedulers'] = []
pools = BuildersPools('blink')
pools['blink'].extend([builder['name'] for builder in c['builders']])
# Buildbot master url:
# Must come before AutoSetupMaster().
if ActiveMaster.is_production_host:
c['buildbotURL'] = ActiveMaster.buildbot_url
else:
c['buildbotURL'] = 'http://%s:%d/' % (
socket.getfqdn(), ActiveMaster.master_port)
# Adds common status and tools to this master.
# Use our own mail notifier.
master_utils.AutoSetupMaster(c, ActiveMaster, False)
if MAIL_NOTIFIER:
# Add a dumb MailNotifier first so it will be used for BuildSlave with
# notify_on_missing set when they go missing.
from buildbot.status import mail
c['status'].append(mail.MailNotifier(
fromaddr=ActiveMaster.from_address,
builders=[],
relayhost=config.Master.smtp,
lookup=master_utils.UsersAreEmails()))
# Try job result emails.
from master.try_mail_notifier import TryMailNotifier
c['status'].append(TryMailNotifier(
fromaddr=ActiveMaster.from_address,
reply_to=ActiveMaster.reply_to,
subject="try %(result)s for %(reason)s @ r%(revision)s",
mode='all',
relayhost=config.Master.smtp,
lookup=master_utils.UsersAreEmails()))
# The followings are what is kept on disk.
# Keep last try jobs, the default is too low. Must keep at least a few days
# worth of try jobs. 3000 is not even a full day but the server is full. Keep
# more build objects than log since they are much smaller.
c['buildHorizon'] = 6000
c['logHorizon'] = 3000
# Must be at least 2x the number of slaves.
c['eventHorizon'] = 200
# Adjust the buildCaches to be 3x the number of slaves per builder.
c['autoBuildCacheRatio'] = 3
c['projectURL'] = 'http://dev.chromium.org/developers/testing/try-server-usage'
# vi: set ts=4 sts=2 sw=2 et: