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

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: add buildbot-tool, turn files into actual templates 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 79%
copy from masters/master.client.mojo/master.cfg
copy to scripts/tools/buildbot_tool_templates/master.cfg
index f6913c94c93af5d4d7a03dcf9277d04383703d91..6a4d90a9503d8d87e068d369a7f27a459fc35c43 100644
--- a/masters/master.client.mojo/master.cfg
+++ b/scripts/tools/buildbot_tool_templates/master.cfg
@@ -2,6 +2,8 @@
# 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 master_utils
from master import slaves_list
@@ -11,7 +13,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,22 +23,7 @@ c['schedulers'] = []
c['builders'] = []
c['status'] = []
-builders = ['Mojo Linux',
- 'Mojo Linux (dbg)',
- 'Mojo Android Builder',
- 'Mojo Android Builder (dbg)',
- 'Mojo Android Builder Tests (dbg)',
- 'Mojo ChromeOS Builder',
- 'Mojo ChromeOS Builder (dbg)',
- 'Mojo Win (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)
@@ -48,7 +35,7 @@ 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'])

Powered by Google App Engine
This is Rietveld 408576698