Skip to content

Commit 9871783

Browse files
authored
Merge pull request #366 from alphagov/bau-add-sandpit-push
BAU: add the sandpit push script for account management
2 parents 8d5688b + c223492 commit 9871783

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

sandpit-push.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
set -eu
4+
REPO_NAME="account-management-image-repository"
5+
REPO_URL="706615647326.dkr.ecr.eu-west-2.amazonaws.com/account-management-image-repository"
6+
IMAGE_TAG=latest
7+
8+
echo "Generating temporary push credentials..."
9+
gds aws di-tools-dev -- aws ecr get-login-password --region eu-west-2 | docker login --username AWS --password-stdin "${REPO_URL}"
10+
11+
echo "Building image..."
12+
docker buildx build --platform=linux/amd64 -t "${REPO_NAME}" .
13+
echo "Tagging image..."
14+
docker tag account-management-image-repository:latest "${REPO_URL}:${IMAGE_TAG}"
15+
16+
echo "Pushing image..."
17+
docker push "${REPO_URL}:${IMAGE_TAG}"
18+
19+
echo "Complete"

0 commit comments

Comments
 (0)