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

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

Issue 2325013002: Add BuildBucket manifest scheduling support. (Closed)
Patch Set: Rebarse Created 4 years, 3 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 603577cbd49fc39ca290323c00803bc8e5a8f350..1878da36a5362ded803e31460b9291e23441bd6b 100644
--- a/scripts/slave/recipe_modules/chromite/api.py
+++ b/scripts/slave/recipe_modules/chromite/api.py
@@ -64,6 +64,7 @@ class ChromiteApi(recipe_api.RecipeApi):
defaults = {
'CBB_CONFIG': self.m.properties.get('cbb_config'),
'CBB_BRANCH': self.m.properties.get('cbb_branch'),
+ 'CBB_MASTER_BUILD_ID': self.m.properties.get('cbb_master_build_id'),
'CBB_DEBUG': self.m.properties.get('cbb_debug') is not None,
'CBB_CLOBBER': 'clobber' in self.m.properties,
}
@@ -148,6 +149,17 @@ class ChromiteApi(recipe_api.RecipeApi):
repository (str): The URL of the repository hosting the change.
revision (str): The revision hash to load the build ID from.
"""
+ if all((self.c.chromite_branch, self.c.cbb.build_id)):
+ # They have all already been populated, so we're done (BuildBucket).
+ return
+
+ # Load our manifest fields from the formatted Gitiles commit message that
+ # scheduled this build.
+ #
+ # First, check that we are actually in a known manifest Gitiles repository.
+ if not self.check_repository('cros_manifest', repository):
+ return
+
commit_log = self.m.gitiles.commit_log(
repository, revision, step_name='Fetch manifest config',
attempts=self._GITILES_ATTEMPTS)
@@ -378,8 +390,8 @@ class ChromiteApi(recipe_api.RecipeApi):
# If our change comes from a Chromium repository, add the
# '--chrome_version' flag.
self.c.cbb.chrome_version = self.m.properties['revision']
- if (self.c.read_cros_manifest and
- self.check_repository('cros_manifest', repository)):
+
+ if self.c.read_cros_manifest:
# This change comes from a manifest repository. Load configuration
# parameters from the manifest command.
self.load_manifest_config(repository, revision)
« 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