Skip to content

Commit 17300e1

Browse files
change: Push to ECR before running tests (#251)
1 parent 71f79ec commit 17300e1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,17 @@ def build_images(args):
174174
args.force, args.skip_tests)
175175
generate_release_notes(target_version)
176176

177+
# Upload to ECR before running tests so that only the exact image which we tested goes to public
178+
# TODO: Move after tests are stabilized
179+
if args.target_ecr_repo is not None:
180+
_push_images_upstream(image_versions, args.region)
181+
177182
if not args.skip_tests:
178183
print(f'Will now run tests against: {image_ids}')
179184
_test_local_images(image_ids, args.target_patch_version)
180185
else:
181186
print('Will skip tests.')
182187

183-
# We only upload to ECR once all images are successfully built locally.
184-
if args.target_ecr_repo is not None:
185-
_push_images_upstream(image_versions, args.region)
186-
187188

188189
def _push_images_upstream(image_versions_to_push: list[dict[str, str]], region: str):
189190
print(f'Will now push the images to ECR: {image_versions_to_push}')

0 commit comments

Comments
 (0)