| # 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. |
| |
| from buildbot.scheduler import Scheduler |
| from buildbot.scheduler import Triggerable |
| |
| from common import chromium_utils |
| |
| from master import gitiles_poller |
| from master import master_config |
| from master import master_utils |
| from master import slaves_list |
| from master.factory import annotator_factory |
| from buildbot import locks |
| |
| import config |
| import master_site_config |
| |
| ActiveMaster = master_site_config.ChromiumChromeDriver |
| |
| # This is the dictionary that the buildmaster pays attention to. We also use |
| # a shorter alias to save typing. |
| c = BuildmasterConfig = {} |
| |
| # 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] |
| |
| |
| ####### SCHEDULERS |
| |
| ## configure the Schedulers |
| |
| # Main scheduler for all changes in trunk. |
| s_chromium = Scheduler(name='chromium', |
| branch='master', |
| treeStableTimer=60, |
| builderNames=['Win7', |
| 'Mac 10.6', |
| 'Linux', |
| 'Linux32', |
| ]) |
| |
| c['schedulers'] = [s_chromium] |
| |
| ####### BUILDERS |
| |
| builders = [] |
| |
| # ---------------------------------------------------------------------------- |
| # FACTORIES |
| |
| f_recipe = annotator_factory.AnnotatorFactory().\ |
| BaseFactory(recipe='chromium.chromedriver.recipe_autogen') |
| # ---------------------------------------------------------------------------- |
| # BUILDER DEFINITIONS |
| |
| b_win7 = { |
| 'name': 'Win7', |
| 'factory': f_recipe, |
| 'builddir': 'chromedriver_win7', |
| 'auto_reboot': False |
| } |
| b_linux = { |
| 'name': 'Linux', |
| 'factory': f_recipe, |
| 'auto_reboot': True |
| } |
| b_linux32 = { |
| 'name': 'Linux32', |
| 'factory': f_recipe, |
| 'auto_reboot': True |
| } |
| b_mac10_6 = { |
| 'name': 'Mac 10.6', |
| 'factory': f_recipe, |
| 'builddir': 'chromedriver_mac_10_6', |
| 'auto_reboot': True |
| } |
| |
| c['builders'] = [ |
| b_win7, |
| b_mac10_6, |
| b_linux, |
| b_linux32, |
| ] |
| |
| # Associate the slaves to the manual builders. The configuration is in |
| # slaves.cfg. |
| slaves = slaves_list.SlavesList('slaves.cfg', 'ChromiumChromeDriver') |
| 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) |