diff --git a/images/linux/scripts/installers/oc.sh b/images/linux/scripts/installers/oc.sh new file mode 100644 index 00000000..31892f10 --- /dev/null +++ b/images/linux/scripts/installers/oc.sh @@ -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)" diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index eb92096b..8567d2cc 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -169,6 +169,7 @@ "{{template_dir}}/scripts/installers/java-tools.sh", "{{template_dir}}/scripts/installers/kind.sh", "{{template_dir}}/scripts/installers/kubernetes-tools.sh", + "{{template_dir}}/scripts/installers/oc.sh", "{{template_dir}}/scripts/installers/leiningen.sh", "{{template_dir}}/scripts/installers/mercurial.sh", "{{template_dir}}/scripts/installers/miniconda.sh", diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index 25c21d9f..56be34c1 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -172,6 +172,7 @@ "{{template_dir}}/scripts/installers/java-tools.sh", "{{template_dir}}/scripts/installers/kind.sh", "{{template_dir}}/scripts/installers/kubernetes-tools.sh", + "{{template_dir}}/scripts/installers/oc.sh", "{{template_dir}}/scripts/installers/leiningen.sh", "{{template_dir}}/scripts/installers/mercurial.sh", "{{template_dir}}/scripts/installers/miniconda.sh", diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index 4601317a..a43a79ed 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -174,6 +174,7 @@ "{{template_dir}}/scripts/installers/java-tools.sh", "{{template_dir}}/scripts/installers/kind.sh", "{{template_dir}}/scripts/installers/kubernetes-tools.sh", + "{{template_dir}}/scripts/installers/oc.sh", "{{template_dir}}/scripts/installers/leiningen.sh", "{{template_dir}}/scripts/installers/mercurial.sh", "{{template_dir}}/scripts/installers/miniconda.sh",