Support concurrent trial builds. (#8113)

Do this by appending the branch to the test image suffix.
This commit is contained in:
jonathanmetzman 2022-08-01 15:47:44 -07:00 committed by GitHub
parent 7e8cab3d29
commit c3495be8f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -292,11 +292,16 @@ def trial_build_main(args=None, local_base_build=True):
"""Main function for trial_build. Pushes test images and then does test
builds."""
args = get_args(args)
if args.branch:
test_image_suffix = f'{TEST_IMAGE_SUFFIX}-{args.branch.lower()}'
else:
test_image_suffix = TEST_IMAGE_SUFFIX
if local_base_build:
build_and_push_test_images.build_and_push_images( # pylint: disable=unexpected-keyword-arg
TEST_IMAGE_SUFFIX)
test_image_suffix)
else:
build_and_push_test_images.gcb_build_and_push_images(TEST_IMAGE_SUFFIX)
build_and_push_test_images.gcb_build_and_push_images(test_image_suffix)
return _do_test_builds(args)