From 77db8c40a05c40fa63f74d8b2f842b096fb41afc Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov <61747324+dibir-magomedsaygitov@users.noreply.github.com> Date: Wed, 2 Dec 2020 19:28:36 +0300 Subject: [PATCH] [Ubuntu] Fix Openshift-client installation (#2184) * fix oc installation * resolve issue --- images/linux/scripts/installers/oc.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/images/linux/scripts/installers/oc.sh b/images/linux/scripts/installers/oc.sh index 2310f33f0..911d73222 100644 --- a/images/linux/scripts/installers/oc.sh +++ b/images/linux/scripts/installers/oc.sh @@ -4,15 +4,17 @@ ## Desc: Installs the OC CLI ################################################################################ +source $HELPER_SCRIPTS/install.sh + # Install the oc CLI -curl "https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz" > oc.tar.gz -tar xvzf oc.tar.gz -rm oc.tar.gz -mv oc /usr/local/bin +DOWNLOAD_URL="https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz" +PACKAGE_TAR_NAME="oc.tar.gz" +download_with_retries $DOWNLOAD_URL "/tmp" $PACKAGE_TAR_NAME +tar xvzf "/tmp/$PACKAGE_TAR_NAME" -C "/usr/local/bin" # Validate the installation echo "Validate the installation" if ! command -v oc; then echo "oc was not installed" exit 1 -fi +fi \ No newline at end of file