| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # This file is used by scripts/tools/buildbot-tool to generate master configs. | 5 # This file was generated from |
| 6 # scripts/tools/buildbot_tool_templates/master.cfg |
| 7 # by "scripts/tools/buildbot-tool gen masters/master.chromium.mojo". |
| 8 # DO NOT EDIT BY HAND! |
| 9 |
| 6 | 10 |
| 7 # These modules come from scripts/master, which must be in the PYTHONPATH. | 11 # These modules come from scripts/master, which must be in the PYTHONPATH. |
| 8 from master import gitiles_poller | 12 from master import gitiles_poller |
| 9 from master import master_utils | 13 from master import master_utils |
| 10 from master import slaves_list | 14 from master import slaves_list |
| 11 from master.factory import annotator_factory | 15 from master.factory import annotator_factory |
| 12 from buildbot.schedulers.basic import SingleBranchScheduler | 16 from buildbot.schedulers.basic import SingleBranchScheduler |
| 13 from buildbot.status.mail import MailNotifier | 17 from buildbot.status.mail import MailNotifier |
| 14 | 18 |
| 15 import config | 19 import config |
| 16 import master_site_config | 20 import master_site_config |
| 17 ActiveMaster = master_site_config.%(master_classname)s | 21 ActiveMaster = master_site_config.ChromiumMojo |
| 18 | 22 |
| 19 m_annotator = annotator_factory.AnnotatorFactory() | 23 m_annotator = annotator_factory.AnnotatorFactory() |
| 20 | 24 |
| 21 c = BuildmasterConfig = {} | 25 c = BuildmasterConfig = {} |
| 22 c['change_source'] = [] | 26 c['change_source'] = [] |
| 23 c['schedulers'] = [] | 27 c['schedulers'] = [] |
| 24 c['builders'] = [] | 28 c['builders'] = [] |
| 25 c['status'] = [] | 29 c['status'] = [] |
| 26 | 30 |
| 27 %(builders_block)s | 31 c['builders'].append({ |
| 32 'name': 'Chromium Mojo Mac', |
| 33 'factory': m_annotator.BaseFactory('chromium_mojo'), |
| 34 'slavebuilddir': 'chromium_mojo'}) |
| 35 c['builders'].append({ |
| 36 'name': 'Chromium Mojo Win', |
| 37 'factory': m_annotator.BaseFactory('chromium_mojo'), |
| 38 'slavebuilddir': 'chromium_mojo'}) |
| 39 c['builders'].append({ |
| 40 'name': 'Chromium Mojo Linux', |
| 41 'factory': m_annotator.BaseFactory('chromium_mojo'), |
| 42 'slavebuilddir': 'chromium_mojo'}) |
| 43 |
| 28 | 44 |
| 29 config.DatabaseSetup(c, require_dbconfig=ActiveMaster.is_production_host) | 45 config.DatabaseSetup(c, require_dbconfig=ActiveMaster.is_production_host) |
| 30 | 46 |
| 31 c['change_source'].append(gitiles_poller.GitilesPoller( | 47 c['change_source'].append(gitiles_poller.GitilesPoller( |
| 32 '%(git_repo_url)s')) | 48 'https://chromium.googlesource.com/src/src.git')) |
| 33 | 49 |
| 34 c['schedulers'].extend([ | 50 c['schedulers'].extend([ |
| 35 SingleBranchScheduler(name='source', | 51 SingleBranchScheduler(name='source', |
| 36 branch='master', | 52 branch='master', |
| 37 treeStableTimer=60, | 53 treeStableTimer=60, |
| 38 builderNames=[b['name'] for b in c['builders']]) | 54 builderNames=[b['name'] for b in c['builders']]) |
| 39 ]) | 55 ]) |
| 40 | 56 |
| 41 c['logCompressionLimit'] = False | 57 c['logCompressionLimit'] = False |
| 42 c['projectName'] = ActiveMaster.project_name | 58 c['projectName'] = ActiveMaster.project_name |
| 43 c['projectURL'] = config.Master.project_url | 59 c['projectURL'] = config.Master.project_url |
| 44 # Must come before AutoSetupMaster(). | 60 # Must come before AutoSetupMaster(). |
| 45 c['buildbotURL'] = ActiveMaster.buildbot_url | 61 c['buildbotURL'] = ActiveMaster.buildbot_url |
| 46 | 62 |
| 47 # Associate the slaves to the manual builders. The configuration is in | 63 # Associate the slaves to the manual builders. The configuration is in |
| 48 # slaves.cfg. | 64 # slaves.cfg. |
| 49 slaves = slaves_list.SlavesList('slaves.cfg', '%(master_classname)s') | 65 slaves = slaves_list.SlavesList('slaves.cfg', 'ChromiumMojo') |
| 50 for builder in c['builders']: | 66 for builder in c['builders']: |
| 51 builder['slavenames'] = slaves.GetSlavesName(builder=builder['name']) | 67 builder['slavenames'] = slaves.GetSlavesName(builder=builder['name']) |
| 52 | 68 |
| 53 # The 'slaves' list defines the set of allowable buildslaves. List all the | 69 # The 'slaves' list defines the set of allowable buildslaves. List all the |
| 54 # slaves registered to a builder. Remove dupes. | 70 # slaves registered to a builder. Remove dupes. |
| 55 c['slaves'] = master_utils.AutoSetupSlaves( | 71 c['slaves'] = master_utils.AutoSetupSlaves( |
| 56 c['builders'], | 72 c['builders'], |
| 57 config.Master.GetBotPassword(), | 73 config.Master.GetBotPassword(), |
| 58 missing_recipients=['buildbot@chromium-build-health.appspotmail.com']) | 74 missing_recipients=['buildbot@chromium-build-health.appspotmail.com']) |
| 59 master_utils.VerifySetup(c, slaves) | 75 master_utils.VerifySetup(c, slaves) |
| 60 | 76 |
| 61 # Adds common status and tools to this master. | 77 # Adds common status and tools to this master. |
| 62 master_utils.AutoSetupMaster(c, ActiveMaster, | 78 master_utils.AutoSetupMaster(c, ActiveMaster, |
| 63 public_html='../master.chromium/public_html', | 79 public_html='../master.chromium/public_html', |
| 64 templates=['../master.chromium/templates'], | 80 templates=['../master.chromium/templates'], |
| 65 tagComparator=getattr(c['change_source'][0], 'comparator', None), | 81 tagComparator=getattr(c['change_source'][0], 'comparator', None), |
| 66 enable_http_status_push=ActiveMaster.is_production_host) | 82 enable_http_status_push=ActiveMaster.is_production_host) |
| 67 | 83 |
| 68 c['status'].append(MailNotifier(fromaddr=ActiveMaster.from_address, | 84 c['status'].append(MailNotifier(fromaddr=ActiveMaster.from_address, |
| 69 mode='problem', | 85 mode='problem', |
| 70 relayhost=config.Master.smtp)) | 86 relayhost=config.Master.smtp)) |
| 71 | 87 |
| 72 # Do it at the end to override values set by AutoSetupMaster, the default is | 88 # Do it at the end to override values set by AutoSetupMaster, the default is |
| 73 # too low. Must keep at least a few days worth of builds. | 89 # too low. Must keep at least a few days worth of builds. |
| 74 c['buildHorizon'] = 3000 | 90 c['buildHorizon'] = 3000 |
| 75 c['logHorizon'] = 3000 | 91 c['logHorizon'] = 3000 |
| 76 # Must be at least 2x the number of slaves. | 92 # Must be at least 2x the number of slaves. |
| 77 c['eventHorizon'] = 200 | 93 c['eventHorizon'] = 200 |
| OLD | NEW |