diff options
author | Eric Boren <borenet@google.com> | 2018-04-23 08:35:45 -0400 |
---|---|---|
committer | Eric Boren <borenet@google.com> | 2018-04-23 13:00:19 +0000 |
commit | 7817931a5c1035742dccae7d71e2083f12bf5a6e (patch) | |
tree | 01b501387d9a33987357be09923354af996fc5fb /infra/bots/recipe_modules | |
parent | 32f8478ae9ecab4513fc65996df6231f22d2a672 (diff) |
Switch RecreateSKPs and Bookmaker bots to use service accounts
Bug: skia:
Change-Id: I59aefe7c7e7a6861b00f0e22310e7ceaff3d6d0e
Reviewed-on: https://skia-review.googlesource.com/122944
Reviewed-by: Ravi Mistry <rmistry@google.com>
Diffstat (limited to 'infra/bots/recipe_modules')
4 files changed, 0 insertions, 51 deletions
diff --git a/infra/bots/recipe_modules/infra/api.py b/infra/bots/recipe_modules/infra/api.py index 3b9b3871d0..ee86cd9cdf 100644 --- a/infra/bots/recipe_modules/infra/api.py +++ b/infra/bots/recipe_modules/infra/api.py @@ -65,21 +65,6 @@ class InfraApi(recipe_api.RecipeApi): UPDATE_GO_ATTEMPTS, cmd=[self.go_exe, 'get', '-u', '-t', '%s/...' % INFRA_GO_PKG]) - class DownloadGitCookies(object): - """Class to download gitcookies from GS.""" - def __init__(self, gs_path, local_path, api): - self._gs_path = gs_path - self._local_path = local_path - self._api = api - - def __enter__(self): - cmd = ['gsutil', 'cp', self._gs_path, self._local_path] - self._api.step('download gitcookies', cmd=cmd, infra_step=True) - - def __exit__(self, exc_type, _value, _traceback): - if self._api.path.exists(self._local_path): - self._api.file.remove('remove %s' % self._local_path, self._local_path) - class MetadataFetch(): def __init__(self, api, metadata_key, local_file, **kwargs): self.m = api diff --git a/infra/bots/recipe_modules/infra/examples/full.expected/failed_one_update.json b/infra/bots/recipe_modules/infra/examples/full.expected/failed_one_update.json index d8df1ebe95..99966e351a 100644 --- a/infra/bots/recipe_modules/infra/examples/full.expected/failed_one_update.json +++ b/infra/bots/recipe_modules/infra/examples/full.expected/failed_one_update.json @@ -71,16 +71,6 @@ }, { "cmd": [ - "gsutil", - "cp", - "/test/gspath", - "[START_DIR]/localpath" - ], - "infra_step": true, - "name": "download gitcookies" - }, - { - "cmd": [ "python", "-u", "\nimport os\nimport urllib2\n\nTOKEN_FILE = 'file'\nTOKEN_URL = 'http://metadata/computeMetadata/v1/project/attributes/key'\n\nreq = urllib2.Request(TOKEN_URL, headers={'Metadata-Flavor': 'Google'})\ncontents = urllib2.urlopen(req).read()\n\nhome = os.path.expanduser('~')\ntoken_file = os.path.join(home, TOKEN_FILE)\n\nwith open(token_file, 'w') as f:\n f.write(contents)\n" diff --git a/infra/bots/recipe_modules/infra/examples/full.expected/infra_tests.json b/infra/bots/recipe_modules/infra/examples/full.expected/infra_tests.json index c69a50a27e..6c88554a9c 100644 --- a/infra/bots/recipe_modules/infra/examples/full.expected/infra_tests.json +++ b/infra/bots/recipe_modules/infra/examples/full.expected/infra_tests.json @@ -49,29 +49,6 @@ }, { "cmd": [ - "gsutil", - "cp", - "/test/gspath", - "[START_DIR]/localpath" - ], - "infra_step": true, - "name": "download gitcookies" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "remove", - "[START_DIR]/localpath" - ], - "infra_step": true, - "name": "remove [START_DIR]/localpath" - }, - { - "cmd": [ "python", "-u", "\nimport os\nimport urllib2\n\nTOKEN_FILE = 'file'\nTOKEN_URL = 'http://metadata/computeMetadata/v1/project/attributes/key'\n\nreq = urllib2.Request(TOKEN_URL, headers={'Metadata-Flavor': 'Google'})\ncontents = urllib2.urlopen(req).read()\n\nhome = os.path.expanduser('~')\ntoken_file = os.path.join(home, TOKEN_FILE)\n\nwith open(token_file, 'w') as f:\n f.write(contents)\n" diff --git a/infra/bots/recipe_modules/infra/examples/full.py b/infra/bots/recipe_modules/infra/examples/full.py index 38b474035e..84b2e2c442 100644 --- a/infra/bots/recipe_modules/infra/examples/full.py +++ b/infra/bots/recipe_modules/infra/examples/full.py @@ -22,9 +22,6 @@ DEPS = [ def RunSteps(api): api.vars.setup() api.infra.update_go_deps() - with api.infra.DownloadGitCookies( - '/test/gspath', api.path['start_dir'].join('localpath'), api): - pass with api.infra.MetadataFetch(api, 'key', 'file'): pass |