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

Commit

Permalink
Specify region based on environment variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Evans committed Dec 11, 2020
1 parent a1b4416 commit cd5834a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def load_docker_cache(tag, docker_registry) -> None:
try:
if "dkr.ecr" in docker_registry:
# we need to get credentials to login to ECR
os.system("$(aws ecr get-login --no-include-email)")
os.system("$(aws ecr get-login --region ${DOCKER_ECR_REGION} --no-include-email)")
import docker_cache
logging.info('Docker cache download is enabled from registry %s', docker_registry)
docker_cache.load_docker_cache(registry=docker_registry, docker_tag=tag)
Expand All @@ -283,7 +283,7 @@ def push_docker_cache(registry, tag, image_id) -> None:
try:
if "dkr.ecr" in registry:
# we need to get credentials to login to ECR
os.system("$(aws ecr get-login --no-include-email)")
os.system("$(aws ecr get-login --region ${DOCKER_ECR_REGION} --no-include-email)")
import docker_cache
logging.info('Docker cache upload is enabled to registry %s', registry)
docker_cache._upload_image(registry, tag, image_id)
Expand Down

0 comments on commit cd5834a

Please sign in to comment.