From 7003bfc477066e7666fa5f7f4cf9c62ed6b19b4b Mon Sep 17 00:00:00 2001 From: badra001 Date: Mon, 24 Jul 2023 09:46:09 -0400 Subject: [PATCH] update copy_image.sh to retry image coy --- CHANGELOG.md | 3 +++ bin/copy_image.sh | 6 ++++-- version.tf | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b265b8f..90c5a81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,3 +13,6 @@ * 2.0.0 -- 2023-01-30 - add versions, require > 0.13 + +* 2.0.1 -- 2023-07-24 + - update copy_image.sh to retry the copy until successful diff --git a/bin/copy_image.sh b/bin/copy_image.sh index e3eea8f..607fdfe 100755 --- a/bin/copy_image.sh +++ b/bin/copy_image.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION="1.0.0" +VERSION="1.0.1" ############################################################################### # This script uses skopeo to copy a docker image from one repository to @@ -306,7 +306,9 @@ copy_image() { echo "Copying $SOURCE_IMAGE" echo "to $DESTINATION_IMAGE" - ${command[@]} + while ! ${command[@]}; do + echo "Retrying uploading image..." + done } diff --git a/version.tf b/version.tf index 6f654e1..cc676d3 100644 --- a/version.tf +++ b/version.tf @@ -1,4 +1,4 @@ locals { _module_name = "aws-ecr-copy-images" - _module_version = "2.0.0" + _module_version = "2.0.1" }