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

Side by Side Diff: scripts/slave/recipes/run_presubmit.py

Issue 2463653002: Stop supporting old Gerrit CQ tryjob properties. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « scripts/slave/recipes/boringssl_docs.expected/boringssl-docs-gerrit-deprecated.json ('k') | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 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 DEPS = [ 5 DEPS = [
6 'depot_tools/bot_update', 6 'depot_tools/bot_update',
7 'depot_tools/gclient', 7 'depot_tools/gclient',
8 'depot_tools/git', 8 'depot_tools/git',
9 'depot_tools/presubmit', 9 'depot_tools/presubmit',
10 'recipe_engine/json', 10 'recipe_engine/json',
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 if codereview_auth: 56 if codereview_auth:
57 presubmit_args.extend([ 57 presubmit_args.extend([
58 '--rietveld_email_file', 58 '--rietveld_email_file',
59 api.path['build'].join('site_config', '.rietveld_client_email')]) 59 api.path['build'].join('site_config', '.rietveld_client_email')])
60 presubmit_args.extend([ 60 presubmit_args.extend([
61 '--rietveld_private_key_file', 61 '--rietveld_private_key_file',
62 api.path['build'].join('site_config', '.rietveld_secret_key')]) 62 api.path['build'].join('site_config', '.rietveld_secret_key')])
63 else: 63 else:
64 presubmit_args.extend(['--rietveld_email', '']) # activate anonymous mode 64 presubmit_args.extend(['--rietveld_email', '']) # activate anonymous mode
65 elif patch_storage == 'gerrit': 65 elif patch_storage == 'gerrit':
66 gerrit_url = api.properties.get('patch_gerrit_url') 66 gerrit_url = api.properties.get('patch_gerrit_url')
Michael Achenbach 2016/11/07 12:54:00 Same as in another CL: Does it make sense to use g
tandrii(chromium) 2016/11/07 13:01:08 sorry. Simplified.
67 if not gerrit_url: 67 issue = api.properties.get('patch_issue')
68 # TODO(tandrii): clean up old Gerrit patch properties. 68 patchset = api.properties.get('patch_set')
69 # Field event.patchSet.ref looks like 'refs/changes/11/338811/4'
70 issue, patchset = api.properties['event.patchSet.ref'].split('/')[-2:]
71 gerrit_url = api.properties['gerrit']
72 else:
73 issue = api.properties.get('patch_issue')
74 patchset = api.properties.get('patch_set')
75 presubmit_args = [ 69 presubmit_args = [
76 '--issue', issue, 70 '--issue', issue,
77 '--patchset', patchset, 71 '--patchset', patchset,
78 '--gerrit_url', gerrit_url, 72 '--gerrit_url', gerrit_url,
79 '--gerrit_fetch', 73 '--gerrit_fetch',
80 ] 74 ]
81 else: # pragma: no cover 75 else: # pragma: no cover
82 assert False, 'patch_storage %s is not supported' % patch_storage 76 assert False, 'patch_storage %s is not supported' % patch_storage
83 if api.properties.get('dry_run'): 77 if api.properties.get('dry_run'):
84 presubmit_args.append('--dry_run') 78 presubmit_args.append('--dry_run')
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 mastername='tryserver.chromium.linux', 160 mastername='tryserver.chromium.linux',
167 buildername='infra_presubmit', 161 buildername='infra_presubmit',
168 repo_name='infra', 162 repo_name='infra',
169 patch_project='infra', 163 patch_project='infra',
170 runhooks=True) + 164 runhooks=True) +
171 api.step_data('presubmit', api.json.output([['infra_presubmit', 165 api.step_data('presubmit', api.json.output([['infra_presubmit',
172 ['compile']]])) 166 ['compile']]]))
173 ) 167 )
174 168
175 yield ( 169 yield (
176 api.test('infra_with_runhooks_and_gerrit_deprecated') +
Michael Achenbach 2016/11/07 12:54:00 Missing deletion of the file?
tandrii(chromium) 2016/11/07 13:01:08 Done.
177 api.properties.tryserver_gerrit(
178 full_project_name='infra/infra',
179 repo_name='infra',
180 mastername='tryserver.infra',
181 buildername='infra_presubmit',
182 runhooks=True) +
183 api.step_data('presubmit', api.json.output([['infra_presubmit',
184 ['compile']]]))
185 )
186
187 yield (
188 api.test('infra_with_runhooks_and_gerrit') + 170 api.test('infra_with_runhooks_and_gerrit') +
189 api.properties.tryserver( 171 api.properties.tryserver(
190 gerrit_project='infra/infra', 172 gerrit_project='infra/infra',
191 repo_name='infra', 173 repo_name='infra',
192 mastername='tryserver.infra', 174 mastername='tryserver.infra',
193 buildername='infra_presubmit', 175 buildername='infra_presubmit',
194 runhooks=True) + 176 runhooks=True) +
195 api.step_data('presubmit', api.json.output([['infra_presubmit', 177 api.step_data('presubmit', api.json.output([['infra_presubmit',
196 ['compile']]])) 178 ['compile']]]))
197 ) 179 )
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 214
233 yield ( 215 yield (
234 api.test('presubmit-infra-failure') + 216 api.test('presubmit-infra-failure') +
235 api.properties.tryserver( 217 api.properties.tryserver(
236 mastername='tryserver.chromium.linux', 218 mastername='tryserver.chromium.linux',
237 buildername='chromium_presubmit', 219 buildername='chromium_presubmit',
238 repo_name='chromium', 220 repo_name='chromium',
239 patch_project='chromium') + 221 patch_project='chromium') +
240 api.step_data('presubmit', api.json.output({}, retcode=2)) 222 api.step_data('presubmit', api.json.output({}, retcode=2))
241 ) 223 )
OLDNEW
« no previous file with comments | « scripts/slave/recipes/boringssl_docs.expected/boringssl-docs-gerrit-deprecated.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698