Skip to content

Commit

Permalink
add retry while doing skopeo copy
Browse files Browse the repository at this point in the history
  • Loading branch information
amitsagtani97 committed Nov 4, 2024
1 parent e7643e9 commit 47200d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/custom-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Build and upload wire-server-deploy container
run: |
container_image=$(nix-build --no-out-link -A container)
skopeo copy --dest-creds "$DOCKER_LOGIN" \
skopeo copy --retry-times 10 --dest-creds "$DOCKER_LOGIN" \
docker-archive:"$container_image" \
"docker://quay.io/wire/wire-server-deploy:${{ steps.upload_name.outputs.UPLOAD_NAME }}"
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/offline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: |
container_image=$(nix-build --no-out-link -A container)
skopeo copy --dest-creds "$DOCKER_LOGIN" \
skopeo copy --retry-times 10 --dest-creds "$DOCKER_LOGIN" \
docker-archive:"$container_image" \
"docker://quay.io/wire/wire-server-deploy:${{ steps.upload_name.outputs.UPLOAD_NAME }}"
env:
Expand Down
4 changes: 2 additions & 2 deletions nix/scripts/create-container-dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ while IFS= read -r image; do
# If an image has both a tag and digest, remove the tag. Return the original if there is no match.
image_trimmed=$(echo "$image" | sed -E 's/(.+)(:.+(@.+))/\1\3/')
if [[ -n "${DOCKER_LOGIN:-}" && "$image" =~ quay.io/wire ]];then
skopeo copy --insecure-policy --src-creds "$DOCKER_LOGIN" \
skopeo copy --retry-times 10 --insecure-policy --src-creds "$DOCKER_LOGIN" \
docker://$image_trimmed docker-archive:${image_path} --additional-tag $image
else
skopeo copy --insecure-policy \
skopeo copy --retry-times 10 --insecure-policy \
docker://$image_trimmed docker-archive:${image_path} --additional-tag $image
fi
echo "${image_filename}.tar" >> $(realpath "$1")/index.txt
Expand Down

0 comments on commit 47200d9

Please sign in to comment.