afdo: Implement orderfile-verify-toolchain builder.
This patch implements the functionality of
orderfile-verify-toolchain builder, which is similar to release
builder and verifies if the orderfile can build Chrome without
any problems.
It adds two stages: (1) before BuildPacakges, it gets most recent
unvetted orderfile and update Chrome ebuild; (2) after the build,
copy the orderfile from unvetted to vetted GS bucket.
If the orderfile to verify is already verified, skip the remaining
part of the builder. (Make the same change to
toolchain-generate-orderfile builder)
Major operations are added to lib/toolchain_util.py. cbuildbot
stage-related changes are added to AFDO stages.
BUG=chromium:950627
TEST=orderfile-verify-toolchain-tryjob passes at https://ci.chromium.org/p/chromeos/builders/general/Try/b8908114095670262240
Change-Id: I8148fc7b976e6c1bcd1b5eafb762be0eb680de7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1682827
Tested-by: Tiancong Wang <tcwang@google.com>
Auto-Submit: Tiancong Wang <tcwang@google.com>
Commit-Queue: Tiancong Wang <tcwang@google.com>
Reviewed-by: Alex Klein <saklein@chromium.org>
diff --git a/api/router.py b/api/router.py
index 56127c3..9056640 100644
--- a/api/router.py
+++ b/api/router.py
@@ -30,6 +30,7 @@
from chromite.api.gen.chromite.api import sdk_pb2
from chromite.api.gen.chromite.api import sysroot_pb2
from chromite.api.gen.chromite.api import test_pb2
+from chromite.api.gen.chromite.api import toolchain_pb2
from chromite.lib import cros_build_lib
from chromite.lib import cros_logging as logging
from chromite.lib import osutils
@@ -342,6 +343,7 @@
router.Register(sdk_pb2)
router.Register(sysroot_pb2)
router.Register(test_pb2)
+ router.Register(toolchain_pb2)
logging.debug('Services registered successfully.')