| # -*- 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. |
| |
| # It has one job: define a dictionary named BuildmasterConfig. This |
| # dictionary has a variety of keys to control different aspects of the |
| # buildmaster. They are documented in docs/config.xhtml . |
| |
| from buildbot.changes import filter |
| from buildbot.config import BuilderConfig |
| from buildbot.schedulers.basic import SingleBranchScheduler |
| from buildbot.status.mail import MailNotifier |
| from master import slaves_list |
| from master import master_utils |
| from master.factory import annotator_factory |
| from master.repo_poller import RepoPoller |
| |
| import master_site_config |
| import config |
| |
| c = BuildmasterConfig = {} |
| |
| |
| ActiveMaster = master_site_config.ART |
| |
| art_recipe_factory=annotator_factory.AnnotatorFactory().BaseFactory(recipe='art') |
| |
| builders_config = { |
| '1aosp-host-x86': [ |
| 'host-x86-ndebug', |
| 'host-x86-debug', |
| ], |
| '1aosp-host-x86_64': [ |
| 'host-x86_64-ndebug', |
| 'host-x86_64-debug', |
| ], |
| '1aosp-target-armv7': [ |
| 'hammerhead-ndebug', |
| 'hammerhead-debug', |
| ], |
| '1aosp-target-armv8': [ |
| 'armv8-ndebug', |
| 'armv8-debug', |
| ], |
| '1aosp-target-fugu': [ |
| 'fugu-ndebug', |
| 'fugu-debug', |
| ], |
| '2aosp-concurrent-collector': [ |
| 'host-x86-concurrent-collector', |
| 'host-x86_64-concurrent-collector', |
| 'hammerhead-concurrent-collector', |
| 'armv8-concurrent-collector', |
| ], |
| '3aosp-builder': [ |
| 'aosp-builder', |
| ], |
| '4aosp-target-mips32': [ |
| 'mips32-ndebug', |
| 'mips32-debug', |
| ], |
| '4aosp-target-mips64': [ |
| 'mips64-emulator-debug', |
| ], |
| } |
| |
| # Builders setup. |
| c['builders'] = [] |
| for category, builders in builders_config.iteritems(): |
| for builder in builders: |
| builder_dict = { |
| 'name': builder, |
| 'category': category, |
| 'factory': art_recipe_factory, |
| 'auto_reboot': False, |
| } |
| c['builders'].append(builder_dict) |
| |
| repopoller = RepoPoller( |
| repo_url = 'https://android.googlesource.com/platform', |
| manifest = 'manifest', |
| repo_branches = ['master-art'], |
| pollInterval = 300, |
| revlinktmpl = 'https://android.googlesource.com/platform/%s/+/%s') |
| c['change_source'] = repopoller |
| |
| |
| # Scheduler setup |
| trunkchanged = SingleBranchScheduler( |
| name = 'trunkchanged', |
| change_filter = filter.ChangeFilter(branch = 'master-art'), |
| treeStableTimer = 0, |
| builderNames = sum(builders_config.values(), [])) |
| c['schedulers'] = [ trunkchanged ] |
| |
| |
| # Slave setup |
| slaves = slaves_list.SlavesList('slaves.cfg', 'ART') |
| for builder in c['builders']: |
| # Associate the slaves to the builders. The configuration is in slaves.cfg. |
| builder['slavenames'] = slaves.GetSlavesName(builder=builder['name']) |
| |
| |
| c['slaves'] = master_utils.AutoSetupSlaves( |
| c['builders'], |
| config.Master.GetBotPassword(), |
| max_builds=3) |
| |
| |
| # Adds common status and tools to this master. |
| master_utils.AutoSetupMaster(c, ActiveMaster, |
| public_html='../master.chromium/public_html', |
| templates=['./templates', '../master.chromium/templates'], |
| order_console_by_time=True) |
| |
| # Don't send mails for mips builders, they are currently broken. |
| mail_builders = ['host-x86-ndebug', |
| 'host-x86-debug', |
| 'host-x86-concurrent-collector', |
| 'host-x86_64-ndebug', |
| 'host-x86_64-debug', |
| 'host-x86_64-concurrent-collector', |
| 'hammerhead-ndebug', |
| 'hammerhead-debug', |
| 'hammerhead-concurrent-collector', |
| 'armv8-ndebug', |
| 'armv8-debug', |
| 'armv8-concurrent-collector', |
| 'fugu-ndebug', |
| 'fugu-debug', |
| 'aosp-builder'] |
| |
| if ActiveMaster.is_production_host: |
| c['status'].append(MailNotifier( |
| fromaddr=ActiveMaster.from_address, |
| sendToInterestedUsers=False, |
| relayhost=config.Master.smtp, |
| mode='problem', |
| builders=mail_builders, |
| extraRecipients=['ngeoffray@google.com', |
| 'agampe@google.com', |
| 'dalvik-team+chromium-buildbot@google.com'])) |
| |
| ####### PROJECT IDENTITY |
| |
| c['projectName'] = ActiveMaster.project_name |
| c['projectURL'] = config.Master.project_url |
| c['buildbotURL'] = ActiveMaster.buildbot_url |