mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
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
This commit is contained in:
24
images/linux/scripts/installers/oc.sh
Normal file
24
images/linux/scripts/installers/oc.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/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)"
|
||||
Reference in New Issue
Block a user