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

Side by Side Diff: scripts/slave/recipe_modules/archive/api.py

Issue 2112413002: Allowing zip_build to use a file name given in build_url. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Untouching blank line. Created 4 years, 5 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/recipe_modules/archive/example.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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 re 5 import re
6 6
7 from recipe_engine import recipe_api 7 from recipe_engine import recipe_api
8 8
9 9
10 # TODO(machenbach): Chromium specific data should move out of the archive 10 # TODO(machenbach): Chromium specific data should move out of the archive
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 src_dir = self.m.path['checkout'] 99 src_dir = self.m.path['checkout']
100 args = [ 100 args = [
101 '--show-path', 101 '--show-path',
102 'python', 102 'python',
103 self.package_repo_resource('scripts', 'slave', 'zip_build.py'), 103 self.package_repo_resource('scripts', 'slave', 'zip_build.py'),
104 '--target', target, 104 '--target', target,
105 '--gsutil-py-path', self.m.depot_tools.gsutil_py_path, 105 '--gsutil-py-path', self.m.depot_tools.gsutil_py_path,
106 '--staging-dir', self.m.path['cache'].join('chrome_staging'), 106 '--staging-dir', self.m.path['cache'].join('chrome_staging'),
107 '--src-dir', src_dir, 107 '--src-dir', src_dir,
108 ] 108 ]
109 if build_url or 'build_archive_url' in self.m.properties: 109 if 'build_archive_url' in self.m.properties:
110 args.extend(['--build-url', 110 args.extend(['--use-build-url-name', '--build-url',
111 build_url or self.m.properties['build_archive_url']]) 111 self.m.properties['build_archive_url']])
112 elif build_url:
113 args.extend(['--build-url', build_url])
112 if build_revision: 114 if build_revision:
113 args.extend(['--build_revision', build_revision]) 115 args.extend(['--build_revision', build_revision])
114 if cros_board: 116 if cros_board:
115 args.extend(['--cros-board', cros_board]) 117 args.extend(['--cros-board', cros_board])
116 if package_dsym_files: 118 if package_dsym_files:
117 args.append('--package-dsym-files') 119 args.append('--package-dsym-files')
118 if exclude_files: 120 if exclude_files:
119 args.extend(['--exclude-files', exclude_files]) 121 args.extend(['--exclude-files', exclude_files])
120 if 'gs_acl' in self.m.properties: 122 if 'gs_acl' in self.m.properties:
121 args.extend(['--gs-acl', self.m.properties['gs_acl']]) 123 args.extend(['--gs-acl', self.m.properties['gs_acl']])
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 If none of the candidate configurations are present, the value None will be 166 If none of the candidate configurations are present, the value None will be
165 returned. 167 returned.
166 """ 168 """
167 if primary_project: 169 if primary_project:
168 commit = update_properties.get('got_%s_revision_git' % primary_project) 170 commit = update_properties.get('got_%s_revision_git' % primary_project)
169 if commit: 171 if commit:
170 return commit 172 return commit
171 commit = update_properties.get('got_%s_revision' % primary_project) 173 commit = update_properties.get('got_%s_revision' % primary_project)
172 if commit and GIT_COMMIT_HASH_RE.match(commit): 174 if commit and GIT_COMMIT_HASH_RE.match(commit):
173 return commit 175 return commit
174 176
175 commit = update_properties.get('got_revision_git') 177 commit = update_properties.get('got_revision_git')
176 if commit: 178 if commit:
177 return commit 179 return commit
178 commit = update_properties.get('got_revision') 180 commit = update_properties.get('got_revision')
179 if commit and GIT_COMMIT_HASH_RE.match(commit): 181 if commit and GIT_COMMIT_HASH_RE.match(commit):
180 return commit 182 return commit
181 return None 183 return None
182 184
183 def _get_comparable_upload_path_for_sort_key(self, branch, number): 185 def _get_comparable_upload_path_for_sort_key(self, branch, number):
184 """Returns a sortable string corresponding to the commit position.""" 186 """Returns a sortable string corresponding to the commit position."""
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 def legacy_download_url(self, gs_bucket_name, extra_url_components=None): 409 def legacy_download_url(self, gs_bucket_name, extra_url_components=None):
408 """Returns a url suitable for downloading a Chromium build from 410 """Returns a url suitable for downloading a Chromium build from
409 Google Storage. 411 Google Storage.
410 412
411 extra_url_components, if specified, should be a string without a 413 extra_url_components, if specified, should be a string without a
412 trailing '/' which is inserted in the middle of the URL. 414 trailing '/' which is inserted in the middle of the URL.
413 415
414 The builder_name, or parent_buildername, is always automatically 416 The builder_name, or parent_buildername, is always automatically
415 inserted into the URL.""" 417 inserted into the URL."""
416 return self._legacy_url(True, gs_bucket_name, extra_url_components) 418 return self._legacy_url(True, gs_bucket_name, extra_url_components)
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/archive/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698