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

Unified Diff: scripts/slave/remote_run.py

Issue 2158593002: remote_run: Allow recipe engine pinning. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 = [
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698