mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
* 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
25 lines
702 B
Bash
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)"
|