From 17300e1d4df453f34c795205568a746bc890be1f Mon Sep 17 00:00:00 2001 From: Clayton Parnell <42805768+claytonparnell@users.noreply.github.com> Date: Sat, 16 Mar 2024 13:45:03 -0400 Subject: [PATCH] change: Push to ECR before running tests (#251) --- src/main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main.py b/src/main.py index c1448f1b..c614f90f 100644 --- a/src/main.py +++ b/src/main.py @@ -174,16 +174,17 @@ def build_images(args): args.force, args.skip_tests) generate_release_notes(target_version) + # Upload to ECR before running tests so that only the exact image which we tested goes to public + # TODO: Move after tests are stabilized + if args.target_ecr_repo is not None: + _push_images_upstream(image_versions, args.region) + if not args.skip_tests: print(f'Will now run tests against: {image_ids}') _test_local_images(image_ids, args.target_patch_version) else: print('Will skip tests.') - # We only upload to ECR once all images are successfully built locally. - if args.target_ecr_repo is not None: - _push_images_upstream(image_versions, args.region) - def _push_images_upstream(image_versions_to_push: list[dict[str, str]], region: str): print(f'Will now push the images to ECR: {image_versions_to_push}')