Skip to content

Commit

Permalink
change: Push to ECR before running tests (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
claytonparnell authored Mar 16, 2024
1 parent 71f79ec commit 17300e1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
Expand Down

0 comments on commit 17300e1

Please sign in to comment.