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

Side by Side Diff: scripts/slave/cipd.py

Issue 2239293002: Switch to cipd module in depot_tools (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: pylint Created 4 years, 4 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
« no previous file with comments | « no previous file | scripts/slave/cipd_bootstrap.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 python 1 #!/usr/bin/env python
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 """cipd.py bootstraps a CIPD client and installs named CIPD packages to a 6 """cipd.py bootstraps a CIPD client and installs named CIPD packages to a
7 directory. 7 directory.
8 """ 8 """
9 9
10 import argparse 10 import argparse
(...skipping 17 matching lines...) Expand all
28 LOGGER = logging.getLogger('cipd') 28 LOGGER = logging.getLogger('cipd')
29 29
30 # Used to contain a CIPD package specification. 30 # Used to contain a CIPD package specification.
31 CipdPackage = collections.namedtuple('CipdPackage', ('name', 'version')) 31 CipdPackage = collections.namedtuple('CipdPackage', ('name', 'version'))
32 32
33 # A CIPD binary description - relative path of the binary within the package. 33 # A CIPD binary description - relative path of the binary within the package.
34 CipdBinary = collections.namedtuple('CipdBinary', ('package', 'relpath')) 34 CipdBinary = collections.namedtuple('CipdBinary', ('package', 'relpath'))
35 35
36 36
37 def bootstrap(path): 37 def bootstrap(path):
38 bootstrap_path = os.path.join(common.env.Build, 'scripts', 'slave', 38 bootstrap_path = os.path.join(
39 'recipe_modules', 'cipd', 'resources', 39 common.env.Build, 'scripts', 'slave', 'cipd_bootstrap.py')
40 'bootstrap.py')
41 40
42 plat, bits = slave.infra_platform.get() 41 plat, bits = slave.infra_platform.get()
43 plat = '%s-%s' % ( 42 plat = '%s-%s' % (
44 plat.replace('win', 'windows'), 43 plat.replace('win', 'windows'),
45 { 44 {
46 32: '386', 45 32: '386',
47 64: 'amd64', 46 64: 'amd64',
48 }[bits] 47 }[bits]
49 ) 48 )
50 json_output = os.path.join(path, 'cipd_bootstrap.json') 49 json_output = os.path.join(path, 'cipd_bootstrap.json')
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 LOGGER.info('CIPD ensuring %d package(s)...', len(opts.package)) 133 LOGGER.info('CIPD ensuring %d package(s)...', len(opts.package))
135 cipd_ensure(client, opts.dest_directory, opts.package, 134 cipd_ensure(client, opts.dest_directory, opts.package,
136 service_account_json=opts.service_account_json, 135 service_account_json=opts.service_account_json,
137 json_output=opts.json_output) 136 json_output=opts.json_output)
138 return 0 137 return 0
139 138
140 139
141 if __name__ == '__main__': 140 if __name__ == '__main__':
142 logging.basicConfig(level=logging.WARNING) 141 logging.basicConfig(level=logging.WARNING)
143 sys.exit(main(sys.argv)) 142 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/cipd_bootstrap.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698