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

fix: add retry_10 around ensure_repo #1963

Merged
merged 4 commits into from
Sep 3, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion build-system/scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function fetch_image() {
}

# Ensure ECR repository exists.
ensure_repo $REPOSITORY $ECR_REGION refresh_lifecycle
retry_10 ensure_repo $REPOSITORY $ECR_REGION refresh_lifecycle

CONTENT_HASH=$(calculate_content_hash $REPOSITORY)
echo "Content hash: $CONTENT_HASH"
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/deploy_dockerhub
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ IMAGE_TAG=$COMMIT_TAG_VERSION
echo "Deploying to dockerhub: $IMAGE_DEPLOY_URI"

# Login.
ensure_repo $REPOSITORY $ECR_DEPLOY_REGION
retry_10 ensure_repo $REPOSITORY $ECR_DEPLOY_REGION

# Pull image.
docker pull $IMAGE_COMMIT_URI
Expand Down
4 changes: 2 additions & 2 deletions build-system/scripts/deploy_ecr
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ REPOSITORY=$1
IMAGE_COMMIT_URI=$ECR_URL/$REPOSITORY:cache-$CONTENT_HASH

# Login to build region and pull the build.
ensure_repo $REPOSITORY $ECR_REGION
retry_10 ensure_repo $REPOSITORY $ECR_REGION
docker pull $IMAGE_COMMIT_URI > /dev/null 2>&1

# Ensure ECR repository exists in deployment region.
ensure_repo $REPOSITORY $ECR_DEPLOY_REGION
retry_10 ensure_repo $REPOSITORY $ECR_DEPLOY_REGION

# Push image to deployment repo with commit hash tag e.g:
# falafel:deadbeefcafebabe1337c0de
Expand Down