cbuildbot: add stage information to the metadata file
This moves metadata generation from the archive step to the final report
step. This way we can integrate all the various stage results into it.
For now, we only run it once per archive stage. In the future, we will
run it more frequently (to provide up-to-date status), but that's not
needed for the first go.
BUG=chrome-os-partner:18393
TEST=trybots
CQ-DEPEND=CL:49337
CQ-DEPEND=CL:49339
Change-Id: I555db68b802804b626989f92da1a32a097d14f03
Reviewed-on: https://gerrit.chromium.org/gerrit/49261
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/cbuildbot.py b/scripts/cbuildbot.py
index 89dce68..faa0da4 100644
--- a/scripts/cbuildbot.py
+++ b/scripts/cbuildbot.py
@@ -425,16 +425,18 @@
self._RunStage(stages.InitSDKStage)
self._RunStage(stages.UprevStage)
self._RunStage(stages.SetupBoardStage)
- self._RunStage(stages.SyncChromeStage)
+ # We need a handle to this stage to extract info from it.
+ sync_chrome_stage = self._GetStageInstance(stages.SyncChromeStage)
+ sync_chrome_stage.Run()
self._RunStage(stages.PatchChromeStage)
configs = self.build_config['child_configs'] or [self.build_config]
tasks = []
for config in configs:
for board in config['boards']:
- archive_stage = self._GetStageInstance(stages.ArchiveStage, board,
- self.release_tag,
- config=config)
+ archive_stage = self._GetStageInstance(
+ stages.ArchiveStage, board, self.release_tag, config=config,
+ chrome_version=sync_chrome_stage.chrome_version)
board_config = BoardConfig(board, config['name'])
self.archive_stages[board_config] = archive_stage
tasks.append((config, board, archive_stage))