implement download_with_retries function

This commit is contained in:
Dibir Magomedsaygitov
2020-07-07 19:23:45 +03:00
parent 5f5c60ef98
commit 5faa6abe7d
2 changed files with 4 additions and 3 deletions

View File

@@ -6,6 +6,7 @@
# Source the helpers for use with the script
source $HELPER_SCRIPTS/document.sh
source $HELPER_SCRIPTS/install.sh
# Determine latest ORAS CLI version
ORAS_CLI_LATEST_VERSION_URL=https://api.github.com/repos/deislabs/oras/releases/latest
@@ -14,7 +15,7 @@ ORAS_CLI_ARCHIVE=$(basename $ORAS_CLI_DOWNLOAD_URL)
# Install ORAS CLI
cd /tmp
curl -LO $ORAS_CLI_DOWNLOAD_URL -o $ORAS_CLI_ARCHIVE
download_with_retries $ORAS_CLI_DOWNLOAD_URL
mkdir -p oras-install
tar -xzvf $ORAS_CLI_ARCHIVE -C oras-install/
mv oras-install/oras /usr/local/bin/