Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Only push image to docker cache when DOCKER_ECR_CACHE is defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Evans committed Dec 11, 2020
1 parent cd5834a commit e85e43c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ci/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ def run_cmd():
image_id = _get_local_image_id(docker_tag=tag)
if not image_id:
raise FileNotFoundError('Unable to find docker image id matching with {}'.format(tag))
# now that we've built the container, push it to our docker cache
push_docker_cache(registry, tag, image_id)
# now that we've built the container, push it to our docker cache if DOCKER_ECR_CACHE is defined
if 'DOCKER_ECR_REGISTRY' in os.environ:
push_docker_cache(registry, tag, image_id)
return image_id


Expand Down

0 comments on commit e85e43c

Please sign in to comment.