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

Unified Diff: masters/master.chromiumos/slaves.cfg

Issue 1068263003: CrOS: Update public waterfall to auto-configure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 8 months 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: masters/master.chromiumos/slaves.cfg
diff --git a/masters/master.chromiumos/slaves.cfg b/masters/master.chromiumos/slaves.cfg
index 4127945a15209b097e8670c7a83ecbbf28fdf1df..9fb8dbd8b6310f66200e746be38a3486d969f861 100644
--- a/masters/master.chromiumos/slaves.cfg
+++ b/masters/master.chromiumos/slaves.cfg
@@ -1,41 +1,43 @@
-# -*- python -*-
-# ex: set syntax=python:
-
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Copyright (c) 2015 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.
-builder_hostname_map = {
- 'amd64-generic ASAN': ['build84-m2'],
- 'amd64-generic paladin': ['build141-m2'],
- 'amd64-generic_freon paladin': ['build182-m2'],
- 'amd64-generic full': ['build90-m2'],
- 'amd64-generic incremental': ['build86-m2'],
- 'arm-generic paladin': ['build263-m2'],
- 'arm-generic full': ['build92-m2'],
- 'daisy incremental': ['build87-m2'],
- 'daisy full': ['build91-m2'],
- 'gizmo paladin': ['build118-m2'],
- 'mipsel-o32-generic paladin': ['build112-m2'],
- 'mipsel-o32-generic full': ['build93-m2'],
- 'panther_embedded-minimal paladin': ['build203-m2'],
- 'x86-generic ASAN': ['build94-m2'],
- 'x86-generic paladin': ['build174-m2'],
- 'x86-generic incremental': ['build85-m2'],
- 'x86-generic full': ['build89-m2'],
- 'chromiumos sdk': ['build162-m2'], # Should stay on a faster machine
- 'refresh packages (chromium:412795)': ['build94-m2'],
-}
+from chromiumos_board_config import *
smut 2015/04/10 21:17:17 Why not just import chromiumos_board_config, and t
dnj 2015/04/10 21:42:45 Mostly because "chromiumos_board_config.builder_co
+
+from common.cros_chromite import SlaveType
+from twisted.python import log
+
+# Use the SlaveAlloctor declared in 'board_config'.
+sa = slave_allocator
+sa.LoadState(enforce=False)
+
+# Baremetal slaves (e.g., build123-m2)
+sa.AddPool(SlaveType.BAREMETAL, *('build%s-m2' % (number,) for number in (
+ 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 94, 112, 118, 141, 162, 174, 182,
+ 203, 263,
+)))
+
+for board_config in builder_configs.itervalues():
+ name = board_config.config.name
+ sa.Join(
+ name,
+ sa.Alloc(
+ 'builder',
+ pools=[SlaveType.BAREMETAL],
+ exclusive=False,
+ subtype=name))
-hostname_builder_map = {}
-for builder, hostnames in builder_hostname_map.iteritems():
- for hostname in hostnames:
- hostname_builder_map.setdefault(hostname, []).append(builder)
+def GenSlave(hostname, config_names):
+ return {
+ 'master': 'ChromiumOS',
+ 'builder': [builder_configs[c].builder_name
+ for c in config_names],
+ 'hostname': str(hostname),
+ 'os': 'linux',
+ 'version': 'precise',
+ }
slaves = []
-for hostname, builders in hostname_builder_map.iteritems():
- slaves.append({'master': 'ChromiumOS',
- 'builder': builders,
- 'hostname': hostname,
- 'os': 'linux',
- 'version': 'precise'})
+slave_map = sa.GetSlaveMap()
+for hostname, entry in slave_map.entries.iteritems():
+ slaves.append(GenSlave(hostname, entry.keys))

Powered by Google App Engine
This is Rietveld 408576698