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

Unified Diff: scripts/slave/recipe_modules/chromite/api.py

Issue 2166673002: Pass buildbucket.build.id to cbuildbot as --buildbucket-id. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: use_json_recipe 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 | scripts/slave/recipe_modules/chromite/config.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/chromite/api.py
diff --git a/scripts/slave/recipe_modules/chromite/api.py b/scripts/slave/recipe_modules/chromite/api.py
index b7da9be2e63641f0e9ce572e9a6ba7e9cd761aa3..78e4e89de3e9d868bb9b96e1f4f3baae182d3927 100644
--- a/scripts/slave/recipe_modules/chromite/api.py
+++ b/scripts/slave/recipe_modules/chromite/api.py
@@ -69,6 +69,11 @@ class ChromiteApi(recipe_api.RecipeApi):
}
if 'buildnumber' in self.m.properties:
defaults['CBB_BUILD_NUMBER'] = int(self.m.properties['buildnumber'])
+
+ if 'buildbucket' in self.m.properties:
+ buildbucket_json = self.m.json.loads(self.m.properties.get('buildbucket'))
+ defaults['CBB_BUILDBUCKET_ID'] = buildbucket_json['build']['id']
+
return defaults
def _load_config_dump(self):
@@ -348,6 +353,8 @@ class ChromiteApi(recipe_api.RecipeApi):
cbb_args.extend(['--chrome_version', self.c.cbb.chrome_version])
if self.c.cbb.config_repo:
cbb_args.extend(['--config_repo', self.c.cbb.config_repo])
+ if self.c.cbb.buildbucket_id:
+ cbb_args.extend(['--buildbucket-id', self.c.cbb.buildbucket_id])
if self.c.repo_cache_dir and self.c.cbb.supports_repo_cache:
cbb_args.extend(['--repo-cache', self.c.repo_cache_dir])
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/chromite/config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698