| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import argparse | 6 import argparse |
| 7 import copy | 7 import copy |
| 8 import json | 8 import json |
| 9 import logging | 9 import logging |
| 10 import os | 10 import os |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 | 31 |
| 32 LOGGER = logging.getLogger('remote_run') | 32 LOGGER = logging.getLogger('remote_run') |
| 33 | 33 |
| 34 | 34 |
| 35 # CIPD_PINS is a mapping of master name to pinned recipe engine CIPD package | 35 # CIPD_PINS is a mapping of master name to pinned recipe engine CIPD package |
| 36 # version. If no pin is found, the CIPD pin for "None" will be used. | 36 # version. If no pin is found, the CIPD pin for "None" will be used. |
| 37 _CIPD_PINS = { | 37 _CIPD_PINS = { |
| 38 # Default recipe engine pin. | 38 # Default recipe engine pin. |
| 39 None: 'latest', | 39 None: 'latest', |
| 40 | |
| 41 # Custom per-master pins. | |
| 42 'chromium.infra': 'canary', | |
| 43 } | 40 } |
| 44 | 41 |
| 45 | 42 |
| 46 def _call(cmd, **kwargs): | 43 def _call(cmd, **kwargs): |
| 47 LOGGER.info('Executing command: %s', cmd) | 44 LOGGER.info('Executing command: %s', cmd) |
| 48 exit_code = subprocess.call(cmd, **kwargs) | 45 exit_code = subprocess.call(cmd, **kwargs) |
| 49 LOGGER.info('Command %s finished with exit code %d.', cmd, exit_code) | 46 LOGGER.info('Command %s finished with exit code %d.', cmd, exit_code) |
| 50 return exit_code | 47 return exit_code |
| 51 | 48 |
| 52 | 49 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 # Re-execute with the updated remote_run.py. | 214 # Re-execute with the updated remote_run.py. |
| 218 return _call([sys.executable] + argv) | 215 return _call([sys.executable] + argv) |
| 219 | 216 |
| 220 stream = annotator.StructuredAnnotationStream() | 217 stream = annotator.StructuredAnnotationStream() |
| 221 with stream.step('remote_run_result'): | 218 with stream.step('remote_run_result'): |
| 222 return main(argv) | 219 return main(argv) |
| 223 | 220 |
| 224 | 221 |
| 225 if __name__ == '__main__': | 222 if __name__ == '__main__': |
| 226 sys.exit(shell_main(sys.argv)) | 223 sys.exit(shell_main(sys.argv)) |
| OLD | NEW |