cbuildbot: Truly support custom artifacts.json
The support for customized archive list through <overlay>/scripts/artifacts.json
in current implementation is fictitious, for various reasons:
* BuildAndArchiveAllImages asserts that base image is to be archived if a config
requests a recovery image. This requirement is very likely to be overlooked
when people write their artifacts.json, and it's config specific while
artifacts.json applies to all configs for a board. So it's better to just do
the right thing (archive the base image) instead of asserting users to
remember everything.
* BuildAndArchiveAllImages relies on a second call to LoadArtifactsList to
add the recovery image in the archive list. This bases on a false assumption
that there's not an artifacts.json found because if there is, the second call
will get whatever the first call gets.
* commands.BuildStandaloneArchive does nothing when 'archive' is omitted in
artifacts.json, whereas it should have at least copied the input from
image_dir to archive_dir because the GS uploader only looks for things in
archive_dir.
BUG=chromium:540049
TEST=Trybot run with rambi-release and a config that has a custom artifacts.json
Change-Id: Ifff116a44b270c691c9250c6da90863cad63f9a7
Reviewed-on: https://chromium-review.googlesource.com/304324
Commit-Ready: Daniel Wang <wonderfly@google.com>
Tested-by: Daniel Wang <wonderfly@google.com>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
2 files changed