| # 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 |
| |
| # These modules come from scripts/master, which must be in the PYTHONPATH. |
| from master import gitiles_poller |
| from master import master_utils |
| from master import slaves_list |
| |
| from master.factory import annotator_factory |
| |
| # These modules come from scripts/common, which must be in the PYTHONPATH. |
| import config |
| import master_site_config |
| |
| from common import chromium_utils |
| |
| ActiveMaster = master_site_config.ChromiumChrome |
| |
| # This is the dictionary that the buildmaster pays attention to. We also use |
| # a shorter alias to save typing. |
| c = BuildmasterConfig = {} |
| |
| config.DatabaseSetup(c, require_dbconfig=ActiveMaster.is_production_host) |
| |
| ####### 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=['Google Chrome Win', |
| 'Google Chrome Linux', |
| 'Google Chrome Linux x64', |
| 'Google Chrome Mac', |
| 'Google Chrome ChromeOS']) |
| |
| c['schedulers'] = [s_chromium] |
| |
| ####### BUILDERS |
| |
| # buildbot/process/factory.py provides several BuildFactory classes you can |
| # start with, which implement build processes for common targets (GNU |
| # autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the |
| # base class, and is configured with a series of BuildSteps. When the build |
| # is run, the appropriate buildslave is told to execute each Step in turn. |
| |
| # the first BuildStep is typically responsible for obtaining a copy of the |
| # sources. There are source-obtaining Steps in buildbot/process/step.py for |
| # CVS, SVN, and others. |
| |
| builders = [] |
| |
| # ---------------------------------------------------------------------------- |
| # FACTORIES |
| |
| m_annotator = annotator_factory.AnnotatorFactory() |
| |
| # ---------------------------------------------------------------------------- |
| # BUILDER DEFINITIONS |
| |
| # Please contact chrome-re before changing this _google_chrome_rel builder |
| # Please keep master.chromium.perf in sync with this |
| b_google_chrome_rel_win = { |
| 'name': 'Google Chrome Win', |
| 'builddir': 'google-chrome-rel-win', |
| 'factory': m_annotator.BaseFactory('chromium', timeout=4800), |
| 'notify_on_missing': True, |
| } |
| |
| # Please contact chrome-re before changing this _google_chrome_rel builder |
| # Please keep master.chromium.perf in sync with this |
| b_google_chrome_rel_linux = { |
| 'name': 'Google Chrome Linux', |
| 'builddir': 'google-chrome-rel-linux', |
| 'factory': m_annotator.BaseFactory('chromium'), |
| 'notify_on_missing': True, |
| } |
| |
| # Please contact chrome-re before changing this _google_chrome_rel builder |
| # TODO(krasin): decrease the timeout when https://crbug.com/569732 is fixed. |
| # Please keep master.chromium.perf in sync with this |
| b_google_chrome_rel_linux_64 = { |
| 'name': 'Google Chrome Linux x64', |
| 'builddir': 'google-chrome-rel-linux_64', |
| 'factory': m_annotator.BaseFactory('chromium', timeout=4800), |
| 'notify_on_missing': True, |
| } |
| |
| # Please contact chrome-re before changing this _google_chrome_rel builder |
| # Please keep master.chromium.perf in sync with this |
| b_google_chrome_rel_mac = { |
| 'name': 'Google Chrome Mac', |
| 'builddir': 'google-chrome-rel-mac', |
| 'factory': m_annotator.BaseFactory('chromium', timeout=2400), |
| 'notify_on_missing': True, |
| } |
| |
| # Please contact chrome-re before changing this _google_chrome_rel builder |
| b_google_chrome_rel_chromeos = { |
| 'name': 'Google Chrome ChromeOS', |
| 'builddir': 'google-chrome-rel-chromeos', |
| 'factory': m_annotator.BaseFactory('chromium'), |
| 'notify_on_missing': True, |
| } |
| |
| c['builders'] = [ |
| b_google_chrome_rel_win, |
| b_google_chrome_rel_linux, |
| b_google_chrome_rel_linux_64, |
| b_google_chrome_rel_mac, |
| b_google_chrome_rel_chromeos, |
| ] |
| |
| # Associate the slaves to the manual builders. The configuration is in |
| # slaves.cfg. |
| slaves = slaves_list.SlavesList('slaves.cfg', 'ChromiumChrome') |
| 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(), |
| missing_recipients=['buildbot@chromium-build-health.appspotmail.com']) |
| |
| # 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) |