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

Side by Side Diff: masters/master.chromiumos/chromiumos_board_config.py

Issue 1402253002: CrOS: Load Chromite pins from JSON. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Rebase (without pin JSON). Created 5 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « PRESUBMIT.py ('k') | scripts/common/cros_chromite.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2015 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 import collections 5 import collections
6 import logging 6 import logging
7 import sys 7 import sys
8 8
9 from common.cros_chromite import Get, ChromiteTarget
9 from common.slave_alloc import SlaveAllocator 10 from common.slave_alloc import SlaveAllocator
10 from common.cros_chromite import Get, ChromiteTarget
11 from master.cros import builder_config 11 from master.cros import builder_config
12 12
13 13
14 # Declare a slave allocator. We do this here so we can access the slaves 14 # Declare a slave allocator. We do this here so we can access the slaves
15 # configured by 'slaves.cfg' in 'master.cfg'. 15 # configured by 'slaves.cfg' in 'master.cfg'.
16 slave_allocator = SlaveAllocator() 16 slave_allocator = SlaveAllocator()
17 17
18 18
19 # Get the pinned Chromite configuration. 19 # Get the pinned Chromite configuration.
20 cbb_config = Get(allow_fetch=True) 20 cbb_config = Get(allow_fetch=True)
21 21
22 22
23 # Select any board that is configured to build on this waterfall. 23 # Select any board that is configured to build on this waterfall.
24 def _GetWaterfallTargets(): 24 def _GetWaterfallTargets():
25 result = collections.OrderedDict() 25 result = collections.OrderedDict()
26 for config in cbb_config.itervalues(): 26 for config in cbb_config.itervalues():
27 if config.get('active_waterfall') != 'chromiumos': 27 if config.get('active_waterfall') != 'chromiumos':
28 continue 28 continue
29 result[config.name] = config 29 result[config.name] = config
30 return result 30 return result
31 waterfall_targets = _GetWaterfallTargets() 31 waterfall_targets = _GetWaterfallTargets()
32 32
33 33
34 # Load the builder configs. 34 # Load the builder configs.
35 builder_configs = builder_config.GetBuilderConfigs(waterfall_targets) 35 builder_configs = builder_config.GetBuilderConfigs(waterfall_targets)
36 builder_name_map = dict((c.builder_name, c) 36 builder_name_map = dict((c.builder_name, c)
37 for c in builder_configs.itervalues()) 37 for c in builder_configs.itervalues())
OLDNEW
« no previous file with comments | « PRESUBMIT.py ('k') | scripts/common/cros_chromite.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698