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

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

Issue 2279953002: lightweight builds archiving for mac and win64 (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: lightweight builds archiving for mac and win64 Created 4 years, 3 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
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 import sys
6 import manual_bisect_files 7 import manual_bisect_files
ghost stip (do not use) 2016/08/31 16:38:27 nit: put a space between system imports and local
7 from recipe_engine import recipe_api 8 from recipe_engine import recipe_api
8 9
9 10
10 # TODO(machenbach): Chromium specific data should move out of the archive 11 # TODO(machenbach): Chromium specific data should move out of the archive
11 # module, into e.g. the chromium test configs. 12 # module, into e.g. the chromium test configs.
12 EXCLUDED_FILES_ALL_PLATFORMS = [ 13 EXCLUDED_FILES_ALL_PLATFORMS = [
13 '.landmines', 14 '.landmines',
14 '.ninja_deps', 15 '.ninja_deps',
15 '.ninja_log', 16 '.ninja_log',
16 'gen', 17 'gen',
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 artifacts implemented as a wrapper around zip_build.py script. 86 artifacts implemented as a wrapper around zip_build.py script.
86 87
87 If you need to upload or download build artifacts (or any other files) for 88 If you need to upload or download build artifacts (or any other files) for
88 something other than Chromium flavor, consider using 'zip' + 'gsutil' or 89 something other than Chromium flavor, consider using 'zip' + 'gsutil' or
89 'isolate' modules instead. 90 'isolate' modules instead.
90 """ 91 """
91 def zip_and_upload_build( 92 def zip_and_upload_build(
92 self, step_name, target, build_url=None, src_dir=None, 93 self, step_name, target, build_url=None, src_dir=None,
93 build_revision=None, cros_board=None, package_dsym_files=False, 94 build_revision=None, cros_board=None, package_dsym_files=False,
94 exclude_files=None, exclude_perf_test_files=False, 95 exclude_files=None, exclude_perf_test_files=False,
95 update_properties=None, store_by_hash=True, **kwargs): 96 update_properties=None, store_by_hash=True,
97 platform=None, **kwargs):
96 """Returns a step invoking zip_build.py to zip up a Chromium build. 98 """Returns a step invoking zip_build.py to zip up a Chromium build.
97 If build_url is specified, also uploads the build.""" 99 If build_url is specified, also uploads the build."""
98 if not src_dir: 100 if not src_dir:
99 src_dir = self.m.path['checkout'] 101 src_dir = self.m.path['checkout']
100 args = [ 102 args = [
101 '--show-path', 103 '--show-path',
102 'python', 104 'python',
103 self.package_repo_resource('scripts', 'slave', 'zip_build.py'), 105 self.package_repo_resource('scripts', 'slave', 'zip_build.py'),
104 '--target', target, 106 '--target', target,
105 '--gsutil-py-path', self.m.depot_tools.gsutil_py_path, 107 '--gsutil-py-path', self.m.depot_tools.gsutil_py_path,
106 '--staging-dir', self.m.path['cache'].join('chrome_staging'), 108 '--staging-dir', self.m.path['cache'].join('chrome_staging'),
107 '--src-dir', src_dir, 109 '--src-dir', src_dir,
108 ] 110 ]
109 if 'build_archive_url' in self.m.properties: 111 if 'build_archive_url' in self.m.properties:
110 args.extend(['--use-build-url-name', '--build-url', 112 args.extend(['--use-build-url-name', '--build-url',
111 self.m.properties['build_archive_url']]) 113 self.m.properties['build_archive_url']])
112 elif build_url: 114 elif build_url:
113 args.extend(['--build-url', build_url]) 115 args.extend(['--build-url', build_url])
114 if build_revision: 116 if build_revision:
115 args.extend(['--build_revision', build_revision]) 117 args.extend(['--build_revision', build_revision])
116 if cros_board: 118 if cros_board:
117 args.extend(['--cros-board', cros_board]) 119 args.extend(['--cros-board', cros_board])
118 if package_dsym_files: 120 if package_dsym_files:
119 args.append('--package-dsym-files') 121 args.append('--package-dsym-files')
120 if exclude_files: 122 if exclude_files:
121 args.extend(['--exclude-files', exclude_files]) 123 args.extend(['--exclude-files', exclude_files])
122 if 'gs_acl' in self.m.properties: 124 if 'gs_acl' in self.m.properties:
123 args.extend(['--gs-acl', self.m.properties['gs_acl']]) 125 args.extend(['--gs-acl', self.m.properties['gs_acl']])
124 if exclude_perf_test_files: 126 if exclude_perf_test_files and platform:
125 inclusions = ','.join(manual_bisect_files.CHROME_REQUIRED_FILES) 127 include_bisect_file_list = (manual_bisect_files.
ghost stip (do not use) 2016/08/31 16:38:27 nit: move the line down and indent so it looks lik
126 strip_files = ','.join(manual_bisect_files.CHROME_STRIP_LIST) 128 get_required_files(platform))
127 args.extend(['--include-files', inclusions]) 129 include_bisect_strip_list = (manual_bisect_files.
128 args.extend(['--ignore-regex']) 130 get_strip_files(platform))
129 args.extend(['--strip-files', strip_files]) 131 include_bisect_whitelist = (manual_bisect_files.
132 get_whitelist_files(platform))
133 if include_bisect_file_list:
134 inclusions = ','.join(include_bisect_file_list)
135 args.extend(['--include-files', inclusions])
136 if include_bisect_strip_list:
137 strip_files = ','.join(include_bisect_strip_list)
138 args.extend(['--strip-files', strip_files])
139 if include_bisect_whitelist:
140 args.extend(['--whitelist', include_bisect_whitelist])
141 args.extend(['--not-include-extra'])
142
130 # If update_properties is passed in and store_by_hash is False, 143 # If update_properties is passed in and store_by_hash is False,
131 # we store it with commit position number instead of a hash 144 # we store it with commit position number instead of a hash
132 if update_properties and not store_by_hash: 145 if update_properties and not store_by_hash:
133 commit_position = self._get_commit_position( 146 commit_position = self._get_commit_position(
134 update_properties, None) 147 update_properties, None)
135 cp_branch, cp_number = self.m.commit_position.parse(commit_position) 148 cp_branch, cp_number = self.m.commit_position.parse(commit_position)
136 args.extend(['--build_revision', cp_number]) 149 args.extend(['--build_revision', cp_number])
137 150
138 properties_json = self.m.json.dumps(self.m.properties.legacy()) 151 properties_json = self.m.json.dumps(self.m.properties.legacy())
139 args.extend(['--factory-properties', properties_json, 152 args.extend(['--factory-properties', properties_json,
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 def legacy_download_url(self, gs_bucket_name, extra_url_components=None): 438 def legacy_download_url(self, gs_bucket_name, extra_url_components=None):
426 """Returns a url suitable for downloading a Chromium build from 439 """Returns a url suitable for downloading a Chromium build from
427 Google Storage. 440 Google Storage.
428 441
429 extra_url_components, if specified, should be a string without a 442 extra_url_components, if specified, should be a string without a
430 trailing '/' which is inserted in the middle of the URL. 443 trailing '/' which is inserted in the middle of the URL.
431 444
432 The builder_name, or parent_buildername, is always automatically 445 The builder_name, or parent_buildername, is always automatically
433 inserted into the URL.""" 446 inserted into the URL."""
434 return self._legacy_url(True, gs_bucket_name, extra_url_components) 447 return self._legacy_url(True, gs_bucket_name, extra_url_components)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698