| Index: scripts/slave/remote_run.py
|
| diff --git a/scripts/slave/remote_run.py b/scripts/slave/remote_run.py
|
| index f0ee51fbab0997a500f91d2c3631163ab169651b..9cff1f63f640982aed8832e91f6ba16c3d3e9e47 100644
|
| --- a/scripts/slave/remote_run.py
|
| +++ b/scripts/slave/remote_run.py
|
| @@ -32,6 +32,17 @@ from slave import update_scripts
|
| LOGGER = logging.getLogger('remote_run')
|
|
|
|
|
| +# CIPD_PINS is a mapping of master name to pinned recipe engine CIPD package
|
| +# version. If no pin is found, the CIPD pin for "None" will be used.
|
| +_CIPD_PINS = {
|
| + # Default recipe engine pin.
|
| + None: 'latest',
|
| +
|
| + # Custom per-master pins.
|
| + 'chromium.infra': 'canary',
|
| +}
|
| +
|
| +
|
| def _call(cmd, **kwargs):
|
| LOGGER.info('Executing command: %s', cmd)
|
| exit_code = subprocess.call(cmd, **kwargs)
|
| @@ -140,9 +151,17 @@ def main(argv):
|
| # on optional cleanup.
|
| LOGGER.exception('Buildbot workdir cleanup failed: %s', e)
|
|
|
| + # Should we use a CIPD pin?
|
| + mastername = properties.get('mastername')
|
| + cipd_pin = None
|
| + if mastername:
|
| + cipd_pin = _CIPD_PINS.get(mastername)
|
| + if not cipd_pin:
|
| + cipd_pin = _CIPD_PINS[None]
|
| +
|
| cipd_path = os.path.join(basedir, '.remote_run_cipd')
|
| _install_cipd_packages(
|
| - cipd_path, cipd.CipdPackage('infra/recipes-py', 'latest'))
|
| + cipd_path, cipd.CipdPackage('infra/recipes-py', cipd_pin))
|
|
|
| recipe_result_path = os.path.join(tempdir, 'recipe_result.json')
|
| recipe_cmd = [
|
|
|