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

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

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

Powered by Google App Engine
This is Rietveld 408576698