Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: scripts/tools/buildbot_tool_templates/master.cfg

Issue 761253003: Add a new buildbot-tool generator for master configs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: merge to head Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: scripts/tools/buildbot_tool_templates/master.cfg
diff --git a/masters/master.client.mojo/master.cfg b/scripts/tools/buildbot_tool_templates/master.cfg
similarity index 77%
copy from masters/master.client.mojo/master.cfg
copy to scripts/tools/buildbot_tool_templates/master.cfg
index 06463a3004b65309d5f15e19de82a3fc289ac1c2..de1fd56a6e48964c867b48a9924903f69ae90680 100644
--- a/masters/master.client.mojo/master.cfg
+++ b/scripts/tools/buildbot_tool_templates/master.cfg
@@ -2,7 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+# This file is used by scripts/tools/buildbot-tool to generate master configs.
+
# 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
@@ -11,7 +14,7 @@ from buildbot.status.mail import MailNotifier
import config
import master_site_config
-ActiveMaster = master_site_config.Mojo
+ActiveMaster = master_site_config.%(master_classname)s
m_annotator = annotator_factory.AnnotatorFactory()
@@ -21,34 +24,18 @@ c['schedulers'] = []
c['builders'] = []
c['status'] = []
-builders = ['Mojo Linux',
- 'Mojo Linux (dbg)',
- 'Mojo Linux ASan',
- 'Mojo Android Builder',
- 'Mojo Android Builder (dbg)',
- 'Mojo Android Builder Tests (dbg)',
- 'Mojo ChromeOS Builder',
- 'Mojo ChromeOS Builder (dbg)',
- 'Mojo Linux Perf']
-
-for builder_name in builders:
- c['builders'].append({
- 'name': builder_name,
- 'factory': m_annotator.BaseFactory('mojo'),
- 'slavebuilddir': 'mojo',
- })
+%(builders_block)s
config.DatabaseSetup(c, require_dbconfig=ActiveMaster.is_production_host)
-import master_source_cfg
-
-master_source_cfg.Update(config, ActiveMaster, c)
+c['change_source'].append(gitiles_poller.GitilesPoller(
+ '%(git_repo_url)s'))
c['schedulers'].extend([
SingleBranchScheduler(name='source',
branch='master',
treeStableTimer=60,
- builderNames=builders)
+ builderNames=[b['name'] for b in c['builders']])
])
c['logCompressionLimit'] = False
@@ -59,7 +46,7 @@ c['buildbotURL'] = ActiveMaster.buildbot_url
# Associate the slaves to the manual builders. The configuration is in
# slaves.cfg.
-slaves = slaves_list.SlavesList('slaves.cfg', 'Mojo')
+slaves = slaves_list.SlavesList('slaves.cfg', '%(master_classname)s')
for builder in c['builders']:
builder['slavenames'] = slaves.GetSlavesName(builder=builder['name'])
« no previous file with comments | « scripts/tools/buildbot_tool_templates/buildbot.tac ('k') | scripts/tools/buildbot_tool_templates/master_site_config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698