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

Side by Side Diff: scripts/common/cros_chromite.py

Issue 1068263003: CrOS: Update public waterfall to auto-configure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Added experimental/documentation annotations to web UI. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « masters/master.chromiumos/templates/waterfall.html ('k') | scripts/common/slave_alloc.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 #!/usr/bin/env python2.7 1 #!/usr/bin/env python2.7
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ 6 """
7 This module wraps ChromeOS's Chromite configuration, providing retrieval 7 This module wraps ChromeOS's Chromite configuration, providing retrieval
8 methods and Infra-aware introspection. 8 methods and Infra-aware introspection.
9 9
10 For any given ChromeOS build, Chromite may be pinned to a specific ChromeOS 10 For any given ChromeOS build, Chromite may be pinned to a specific ChromeOS
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 GCE = 'gce' 65 GCE = 'gce'
66 66
67 67
68 class ChromiteTarget(object): 68 class ChromiteTarget(object):
69 """Wraps a single Chromite target. 69 """Wraps a single Chromite target.
70 70
71 Reproduces some core logic from Chromite's 'cbuildbot' libraries to access 71 Reproduces some core logic from Chromite's 'cbuildbot' libraries to access
72 various configuration parameters. 72 various configuration parameters.
73 """ 73 """
74 74
75 ASAN = 'asan'
76 CANARY = 'canary'
77 FACTORY = 'factory'
78 FIRMWARE = 'firmware'
79 FULL = 'full'
80 INCREMENTAL = 'incremental'
81 PALADIN = 'paladin'
82 PFQ = 'pfq'
83 PRE_CQ = 'pre-cq'
75 PRE_CQ_LAUNCHER = 'pre-cq-launcher' 84 PRE_CQ_LAUNCHER = 'pre-cq-launcher'
76 PRE_CQ = 'pre-cq' 85 REFRESH_PACKAGES = 'refresh-packages'
77 PFQ = 'pfq'
78 PALADIN = 'paladin'
79 CANARY = 'canary'
80 FIRMWARE = 'firmware'
81 INCREMENTAL = 'incremental'
82 FACTORY = 'factory'
83 SDK = 'sdk' 86 SDK = 'sdk'
84 TOOLCHAIN = 'toolchain' 87 TOOLCHAIN = 'toolchain'
85 88
86 # Maps cbuildbot's "build_type" field to target constants. This is used in the 89 # Maps cbuildbot's "build_type" field to target constants. This is used in the
87 # first pass prior to attempting to infer the class from the target's name. 90 # first pass prior to attempting to infer the class from the target's name.
88 # (see Categorize) 91 # (see Categorize)
89 BUILD_TYPE_CATEGORY_MAP = { 92 BUILD_TYPE_CATEGORY_MAP = {
90 'priest': PRE_CQ_LAUNCHER, 93 'priest': PRE_CQ_LAUNCHER,
91 'paladin': PALADIN, 94 'paladin': PALADIN,
92 'canary': CANARY, 95 'canary': CANARY,
93 'chrome': PFQ, 96 'chrome': PFQ,
94 } 97 }
95 98
96 # Maps configuration name suffixes to target type constants. 99 # Maps configuration name suffixes to target type constants.
97 # (see Categorize) 100 # (see Categorize)
98 SUFFIX_MAP = collections.OrderedDict(( 101 SUFFIX_MAP = collections.OrderedDict((
102 (ASAN, ('asan',)),
103 (CANARY, ('release', 'release-group',)),
104 (FACTORY, ('factory',)),
105 (FIRMWARE, ('firmware',)),
106 (FULL, ('full',)),
107 (INCREMENTAL, ('incremental',)),
108 (PALADIN, ('paladin',)),
109 (PFQ, ('chrome-pfq', 'chromium-pfq',)),
99 (PRE_CQ, ('pre-cq',)), 110 (PRE_CQ, ('pre-cq',)),
100 (PFQ, ('chrome-pfq', 'chromium-pfq',)), 111 (REFRESH_PACKAGES, ('refresh-packages',)),
101 (PALADIN, ('paladin',)),
102 (CANARY, ('release', 'release-group',)),
103 (FIRMWARE, ('firmware',)),
104 (INCREMENTAL, ('incremental',)),
105 (FACTORY, ('factory',)),
106 (SDK, ('sdk',)), 112 (SDK, ('sdk',)),
107 (TOOLCHAIN, ('toolchain-major', 'toolchain-minor',)), 113 (TOOLCHAIN, ('toolchain-major', 'toolchain-minor',)),
108 )) 114 ))
109 115
110 # Sentinel value to indicate a missing key. 116 # Sentinel value to indicate a missing key.
111 _MISSING = object() 117 _MISSING = object()
112 118
113 def __init__(self, name, config, children=None, default=None): 119 def __init__(self, name, config, children=None, default=None):
114 self._name = name 120 self._name = name
115 self._config = config 121 self._config = config
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 557
552 # Allow this script to be used as a bootstrap to fetch/cache Chromite 558 # Allow this script to be used as a bootstrap to fetch/cache Chromite
553 # artifacts (gclient runhooks). 559 # artifacts (gclient runhooks).
554 if __name__ == '__main__': 560 if __name__ == '__main__':
555 logging.basicConfig() 561 logging.basicConfig()
556 try: 562 try:
557 sys.exit(main()) 563 sys.exit(main())
558 except Exception as e: 564 except Exception as e:
559 logging.exception("Uncaught execption: %s", e) 565 logging.exception("Uncaught execption: %s", e)
560 sys.exit(1) 566 sys.exit(1)
OLDNEW
« no previous file with comments | « masters/master.chromiumos/templates/waterfall.html ('k') | scripts/common/slave_alloc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698