Skip to content

Commit fd47263

Browse files
authored
Merge pull request #4 from SenteraLLC/push-to-ecr
Push to ecr
2 parents db9c487 + 92cd099 commit fd47263

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

push-to-ecr.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Login to AWS ECR (uses AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
2+
pip install awscli
3+
export PATH=$PATH:$HOME/.local/bin
4+
eval $(aws ecr get-login --no-include-email --region us-east-1)
5+
6+
# Push tagged images
7+
ECR_IMAGE_PREFIX="${ECR_BASE}/${SERVICE_NAME}"
8+
ECR_IMAGE="${ECR_IMAGE_PREFIX}:${VERSION_TAG}"
9+
echo "Pushing ${ECR_IMAGE}"
10+
docker tag $VERSION_TAG $ECR_IMAGE
11+
docker push $ECR_IMAGE
12+
env_tags=$(wget -O - https://github.com/SenteraLLC/version.sh/raw/master/env-tags.sh | bash)
13+
for env_tag in $env_tags; do
14+
full_tag="${ECR_IMAGE_PREFIX}:${env_tag}"
15+
echo "Pushing ${full_tag}"
16+
docker tag $VERSION_TAG $full_tag
17+
docker push $full_tag
18+
done

0 commit comments

Comments
 (0)