Files
runner-images/images/linux/scripts/installers/oc.sh
Dibir Magomedsaygitov 77db8c40a0 [Ubuntu] Fix Openshift-client installation (#2184)
* fix oc installation

* resolve issue
2020-12-02 19:28:36 +03:00

20 lines
668 B
Bash

#!/bin/bash -e
################################################################################
## File: oc.sh
## Desc: Installs the OC CLI
################################################################################
source $HELPER_SCRIPTS/install.sh
# Install the oc CLI
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