Skip to content

Commit

Permalink
fix: add retry_10 around ensure_repo (#1963)
Browse files Browse the repository at this point in the history
This aims to fix a mysterious exit 1 in build.
  • Loading branch information
ludamad authored Sep 3, 2023
1 parent 21c2f8e commit 0afde39
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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

0 comments on commit 0afde39

Please sign in to comment.