| # Copyright (c) 2012 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. |
| # vim: set ft=python: |
| |
| from buildbot.scheduler import Dependent |
| |
| from common import chromium_utils |
| |
| from master import gitiles_poller |
| from master import master_config |
| from master import master_utils |
| from master import recipe_master_helper |
| from master import slaves_list |
| from master.factory import remote_run_factory |
| |
| import collections |
| import config |
| import master_site_config |
| |
| ActiveMaster = master_site_config.ChromiumGPU |
| |
| # This is the dictionary that the buildmaster pays attention to. We also use |
| # a shorter alias to save typing. |
| c = BuildmasterConfig = {} |
| c['status'] = [] |
| |
| # Disable compression for the stdio files. |
| c['logCompressionLimit'] = False |
| |
| config.DatabaseSetup(c) |
| |
| ####### CHANGESOURCES |
| |
| master_poller = gitiles_poller.GitilesPoller( |
| 'https://chromium.googlesource.com/chromium/src') |
| |
| c['change_source'] = [master_poller] |
| |
| |
| ####### SLAVES |
| |
| # Load the slave list. We need some information from it in order to |
| # produce the builders. |
| slaves = slaves_list.SlavesList('slaves.cfg', 'ChromiumGPU') |
| |
| ####### SCHEDULERS |
| |
| ## configure the Schedulers |
| |
| # Main scheduler for all changes in trunk. |
| |
| trigger_name_map = recipe_master_helper.AddSchedulersAndTriggers( |
| buildmaster_config=c, slave_list=slaves, |
| scheduler_name='gpu', branch='master') |
| |
| ####### BUILDERS |
| |
| builders = [] |
| |
| # ---------------------------------------------------------------------------- |
| # FACTORIES |
| |
| def m_remote_run(recipe, factory_properties=None, **kwargs): |
| if not factory_properties: |
| factory_properties = {} |
| if not factory_properties.get('path_config'): |
| factory_properties['path_config'] = 'kitchen' |
| return remote_run_factory.RemoteRunFactory( |
| active_master=ActiveMaster, |
| repository='https://chromium.googlesource.com/chromium/tools/build.git', |
| recipe=recipe, |
| factory_properties=factory_properties, |
| **kwargs) |
| |
| # ---------------------------------------------------------------------------- |
| # BUILDER DEFINITIONS |
| |
| recipe_master_helper.AddRemoteRunBuilders( |
| c, slaves, m_remote_run, trigger_name_map) |
| |
| # Associate the slaves to the manual builders. The configuration is in |
| # slaves.cfg. |
| for builder in c['builders']: |
| builder['slavenames'] = slaves.GetSlavesName(builder=builder['name']) |
| |
| ####### BUILDSLAVES |
| |
| # 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()) |
| |
| # Make sure everything works together. |
| master_utils.VerifySetup(c, slaves) |
| |
| ####### STATUS TARGETS |
| |
| # Buildbot master url: |
| # Must come before AutoSetupMaster(). |
| c['buildbotURL'] = ActiveMaster.buildbot_url |
| |
| # Adds common status and tools to this master. |
| master_utils.AutoSetupMaster(c, ActiveMaster, |
| public_html='../master.chromium/public_html', |
| templates=['../master.chromium/templates'], |
| tagComparator=master_poller.comparator, |
| enable_http_status_push=ActiveMaster.is_production_host) |