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

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

Issue 1811953003: Revert of ensure_goma for goma canary (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 9 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 from recipe_engine import recipe_api 5 from recipe_engine import recipe_api
6 6
7 class GomaApi(recipe_api.RecipeApi): 7 class GomaApi(recipe_api.RecipeApi):
8 """GomaApi contains helper functions for using goma.""" 8 """GomaApi contains helper functions for using goma."""
9 9
10 def update_goma_canary(self): 10 def update_goma_canary(self):
11 """Returns a step for updating goma canary.""" 11 """Returns a step for updating goma canary."""
12 # deprecated? switch to use ensure_goma with canary=True.
13 # for git checkout, should use @refs/heads/master to use head. 12 # for git checkout, should use @refs/heads/master to use head.
14 head = 'refs/heads/master' 13 head = 'refs/heads/master'
15 # TODO(phajdan.jr): Remove path['build'] usage, http://crbug.com/437264 . 14 # TODO(phajdan.jr): Remove path['build'] usage, http://crbug.com/437264 .
16 self.m.gclient('update goma canary', 15 self.m.gclient('update goma canary',
17 ['sync', '--verbose', '--force', 16 ['sync', '--verbose', '--force',
18 '--revision', 'build/goma@%s' % head], 17 '--revision', 'build/goma@%s' % head],
19 cwd=self.m.path['build']) 18 cwd=self.m.path['build'])
20 19
21 def ensure_goma(self, goma_dir, canary=False): 20 def ensure_goma(self, goma_dir):
22 # TODO(iannucci): switch to CIPD (https://goto.google.com/toxxq). 21 # TODO(iannucci): switch to CIPD (https://goto.google.com/toxxq).
23 args=[ 22 self.m.python(
23 name='ensure_goma',
24 script=self.resource('ensure_goma.py'),
25 args=[
24 '--target-dir', goma_dir, 26 '--target-dir', goma_dir,
25 '--download-from-google-storage-path', 27 '--download-from-google-storage-path',
26 self.m.depot_tools.download_from_google_storage_path 28 self.m.depot_tools.download_from_google_storage_path
27 ] 29 ],
28 if canary:
29 args += ['--canary']
30 self.m.python(
31 name='ensure_goma',
32 script=self.resource('ensure_goma.py'),
33 args=args,
34 infra_step=True) 30 infra_step=True)
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/chromium_tests/api.py ('k') | scripts/slave/recipe_modules/goma/resources/ensure_goma.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698