Files
runner-images/images/ubuntu/scripts/build/install-oc-cli.sh
T

25 lines
854 B
Bash
Raw Normal View History

2020-10-07 13:49:40 +05:00
#!/bin/bash -e
2020-07-07 07:36:28 -07:00
################################################################################
2023-11-22 21:49:23 +01:00
## File: install-oc-cli.sh
## Desc: Install the OC CLI
2020-07-07 07:36:28 -07:00
################################################################################
2023-12-29 12:36:27 +01:00
# Source the helpers for use with the script
2024-07-01 22:26:57 +05:30
source $HELPER_SCRIPTS/os.sh
source $HELPER_SCRIPTS/install.sh
2024-07-01 22:26:57 +05:30
if is_ubuntu20; then
toolset_version=$(get_toolset_value '.ocCli.version')
download_url="https://mirror.openshift.com/pub/openshift-v4/clients/ocp/$toolset_version/openshift-client-linux-$toolset_version.tar.gz"
else
# Install the oc CLI
download_url="https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz"
fi
archive_path=$(download_with_retry "$download_url")
tar xzf "$archive_path" -C "/usr/local/bin" oc
2020-07-07 07:36:28 -07:00
2023-11-22 21:49:23 +01:00
invoke_tests "CLI.Tools" "OC CLI"