Files
runner-images/images/linux/scripts/installers/oc.sh
Patrick Simonian bd35954e5f Add oc cli tool v4.6 (#1103)
* add oc cli tool 3.11.x

* change version to 4.6

* Update oc.sh

update mirror link

* Update Ubuntu1604-README.md

* update docs

* Update oc.sh

* Update oc.sh
2020-07-07 17:36:28 +03:00

25 lines
702 B
Bash

#!/bin/bash
################################################################################
## File: oc.sh
## Desc: Installs the OC CLI
################################################################################
# Source the helpers
source $HELPER_SCRIPTS/document.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
# Validate the installation
echo "Validate the installation"
if ! command -v oc; then
echo "oc was not installed"
exit 1
fi
# Document the installed version
echo "Document the installed version"
DocumentInstalledItem "oc CLI $(oc version)"