Skip to content

Commit

Permalink
[Ops] Build and Release Image: use ecr-public command when targeting …
Browse files Browse the repository at this point in the history
…ECR public endpoint and standard ecr otherwise.
  • Loading branch information
gmarciani committed Oct 17, 2023
1 parent bd3e25f commit db24fd7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/build_and_release_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ elif ! [[ $TAG =~ [0-9]{4}\.(0[1-9]|1[0-2])\.[0-9]+ ]]; then
fi

echo "[INFO] Logging in ${ECR_ENDPOINT}"
aws ecr-public get-login-password --region "$ECR_REGION" | docker login --username AWS --password-stdin "${ECR_ENDPOINT}"
[[ $ECR_ENDPOINT =~ ^public.ecr.aws/.*$ ]] && ECR_COMMAND=ecr-public || ECR_COMMAND=ecr
aws $ECR_COMMAND get-login-password --region "$ECR_REGION" | docker login --username AWS --password-stdin "${ECR_ENDPOINT}"

echo "[INFO] Building frontend"

Expand Down

0 comments on commit db24fd7

Please sign in to comment.