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

Side by Side Diff: scripts/slave/recipes/infra/luci_gae.py

Issue 1919193002: build: roll infra_paths changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: merge Created 4 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
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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/infra_paths',
9 'recipe_engine/json', 10 'recipe_engine/json',
10 'recipe_engine/path', 11 'recipe_engine/path',
11 'recipe_engine/properties', 12 'recipe_engine/properties',
12 'recipe_engine/python', 13 'recipe_engine/python',
13 'depot_tools/tryserver', 14 'depot_tools/tryserver',
14 ] 15 ]
15 16
16 17
17 def _run_presubmit(api, patch_root, bot_update_step): 18 def _run_presubmit(api, patch_root, bot_update_step):
18 upstream = bot_update_step.json.output['properties'].get( 19 upstream = bot_update_step.json.output['properties'].get(
19 api.gclient.c.got_revision_mapping[ 20 api.gclient.c.got_revision_mapping[
20 'infra/go/src/github.com/luci/gae']) 21 'infra/go/src/github.com/luci/gae'])
21 # The presubmit must be run with proper Go environment. 22 # The presubmit must be run with proper Go environment.
22 # infra/go/env.py takes care of this. 23 # infra/go/env.py takes care of this.
23 presubmit_cmd = [ 24 presubmit_cmd = [
24 'python', # env.py will replace with this its sys.executable. 25 'python', # env.py will replace with this its sys.executable.
25 api.path['depot_tools'].join('presubmit_support.py'), 26 api.infra_paths['depot_tools'].join('presubmit_support.py'),
26 '--root', api.path['slave_build'].join(patch_root), 27 '--root', api.infra_paths['slave_build'].join(patch_root),
27 '--commit', 28 '--commit',
28 '--verbose', '--verbose', 29 '--verbose', '--verbose',
29 '--issue', api.properties['issue'], 30 '--issue', api.properties['issue'],
30 '--patchset', api.properties['patchset'], 31 '--patchset', api.properties['patchset'],
31 '--skip_canned', 'CheckRietveldTryJobExecution', 32 '--skip_canned', 'CheckRietveldTryJobExecution',
32 '--skip_canned', 'CheckTreeIsOpen', 33 '--skip_canned', 'CheckTreeIsOpen',
33 '--skip_canned', 'CheckBuildbotPendingBuilds', 34 '--skip_canned', 'CheckBuildbotPendingBuilds',
34 '--rietveld_url', api.properties['rietveld'], 35 '--rietveld_url', api.properties['rietveld'],
35 '--rietveld_fetch', 36 '--rietveld_fetch',
36 '--upstream', upstream, 37 '--upstream', upstream,
37 '--rietveld_email', '' 38 '--rietveld_email', ''
38 ] 39 ]
39 api.python('presubmit', api.path['checkout'].join('go', 'env.py'), 40 api.python('presubmit', api.path['checkout'].join('go', 'env.py'),
40 presubmit_cmd, env={'PRESUBMIT_BUILDER': '1'}) 41 presubmit_cmd, env={'PRESUBMIT_BUILDER': '1'})
41 42
42 43
43 def _commit_change(api, patch_root): 44 def _commit_change(api, patch_root):
44 api.git('-c', 'user.email=commit-bot@chromium.org', 45 api.git('-c', 'user.email=commit-bot@chromium.org',
45 '-c', 'user.name=The Commit Bot', 46 '-c', 'user.name=The Commit Bot',
46 'commit', '-a', '-m', 'Committed patch', 47 'commit', '-a', '-m', 'Committed patch',
47 name='commit git patch', 48 name='commit git patch',
48 cwd=api.path['slave_build'].join(patch_root)) 49 cwd=api.infra_paths['slave_build'].join(patch_root))
49 50
50 51
51 def RunSteps(api): 52 def RunSteps(api):
52 api.gclient.set_config('luci_gae') 53 api.gclient.set_config('luci_gae')
53 # patch_root must match the luci/gae repo, not infra checkout. 54 # patch_root must match the luci/gae repo, not infra checkout.
54 for path in api.gclient.c.got_revision_mapping: 55 for path in api.gclient.c.got_revision_mapping:
55 if 'github.com/luci/gae' in path: 56 if 'github.com/luci/gae' in path:
56 patch_root = path 57 patch_root = path
57 break 58 break
58 bot_update_step = api.bot_update.ensure_checkout(force=True, 59 bot_update_step = api.bot_update.ensure_checkout(force=True,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 repository='https://chromium.googlesource.com/external/github.com/luci/g ae', 95 repository='https://chromium.googlesource.com/external/github.com/luci/g ae',
95 ) 96 )
96 ) 97 )
97 yield ( 98 yield (
98 api.test('presubmit_try_job') + 99 api.test('presubmit_try_job') +
99 api.properties.tryserver( 100 api.properties.tryserver(
100 mastername='tryserver.infra', 101 mastername='tryserver.infra',
101 buildername='Luci-GAE Presubmit', 102 buildername='Luci-GAE Presubmit',
102 ) + api.step_data('presubmit', api.json.output([[]])) 103 ) + api.step_data('presubmit', api.json.output([[]]))
103 ) 104 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698