OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 | 5 |
6 from recipe_engine import recipe_api | 6 from recipe_engine import recipe_api |
7 import shlex | 7 import shlex |
8 | 8 |
9 | 9 |
10 DEFAULT_TASK_EXPIRATION = 20*60*60 | 10 DEFAULT_TASK_EXPIRATION = 20*60*60 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 '--platform=darwin', '--no_auth', '--bucket', 'chromium-luci', | 54 '--platform=darwin', '--no_auth', '--bucket', 'chromium-luci', |
55 '-d', luci_go_dir.join('mac64')], | 55 '-d', luci_go_dir.join('mac64')], |
56 env=env) | 56 env=env) |
57 self.m.step('download luci-go win', | 57 self.m.step('download luci-go win', |
58 ['download_from_google_storage', '--no_resume', | 58 ['download_from_google_storage', '--no_resume', |
59 '--platform=win32', '--no_auth', '--bucket', 'chromium-luci', | 59 '--platform=win32', '--no_auth', '--bucket', 'chromium-luci', |
60 '-d', luci_go_dir.join('win64')], | 60 '-d', luci_go_dir.join('win64')], |
61 env=env) | 61 env=env) |
62 # Copy binaries to the expected location. | 62 # Copy binaries to the expected location. |
63 dest = self.m.path['slave_build'].join('luci-go') | 63 dest = self.m.path['slave_build'].join('luci-go') |
64 self.m.skia.rmtree(dest) | 64 self.m.run.rmtree(dest) |
65 self.m.file.copytree('Copy Go binary', | 65 self.m.file.copytree('Copy Go binary', |
66 source=luci_go_dir, | 66 source=luci_go_dir, |
67 dest=dest) | 67 dest=dest) |
68 | 68 |
69 def isolate_and_trigger_task( | 69 def isolate_and_trigger_task( |
70 self, isolate_path, isolate_base_dir, task_name, isolate_vars, | 70 self, isolate_path, isolate_base_dir, task_name, isolate_vars, |
71 swarm_dimensions, isolate_blacklist=None, extra_isolate_hashes=None, | 71 swarm_dimensions, isolate_blacklist=None, extra_isolate_hashes=None, |
72 idempotent=False, store_output=True, extra_args=None, expiration=None, | 72 idempotent=False, store_output=True, extra_args=None, expiration=None, |
73 hard_timeout=None, io_timeout=None, cipd_packages=None): | 73 hard_timeout=None, io_timeout=None, cipd_packages=None): |
74 """Isolate inputs and trigger the task to run.""" | 74 """Isolate inputs and trigger the task to run.""" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 else: | 285 else: |
286 for _, task in step_result.json.output.get('tasks', {}).iteritems(): | 286 for _, task in step_result.json.output.get('tasks', {}).iteritems(): |
287 ids.append(task['task_id']) | 287 ids.append(task['task_id']) |
288 for idx, task_id in enumerate(ids): | 288 for idx, task_id in enumerate(ids): |
289 link = MILO_LOG_LINK % task_id | 289 link = MILO_LOG_LINK % task_id |
290 k = 'view steps on Milo' | 290 k = 'view steps on Milo' |
291 if len(ids) > 1: # pragma: nocover | 291 if len(ids) > 1: # pragma: nocover |
292 k += ' (shard index %d, %d total)' % (idx, len(ids)) | 292 k += ' (shard index %d, %d total)' % (idx, len(ids)) |
293 step_result.presentation.links[k] = link | 293 step_result.presentation.links[k] = link |
294 | 294 |
OLD | NEW |