Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create missing repos in ecr.sh #1999

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions hack/e2e/ecr.sh
Original file line number Diff line number Diff line change
@@ -23,6 +23,12 @@ function ecr_build_and_push() {
IMAGE_TAG=${4}
IMAGE_ARCH=${5}

REPO_LIST=$(aws ecr describe-repositories --region "${REGION}")
if [ $(jq ".repositories | map(.repositoryName) | index(\"${IMAGE_NAME}\")" <<<"${REPO_CHECK}") == "null" ]; then
loudecho "Creating missing ECR repository ${IMAGE_NAME}"
aws ecr create-repository --region "${REGION}" --repository-name "${IMAGE_NAME}"
fi

loudecho "Building and pushing test driver image to ${IMAGE_NAME}:${IMAGE_TAG}"
aws ecr get-login-password --region "${REGION}" | docker login --username AWS --password-stdin "${AWS_ACCOUNT_ID}.dkr.ecr.${REGION}.amazonaws.com"