From bd35954e5f4a6548e52419451f2fdc76ea8067f3 Mon Sep 17 00:00:00 2001 From: Patrick Simonian Date: Tue, 7 Jul 2020 07:36:28 -0700 Subject: [PATCH] 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 --- images/linux/scripts/installers/oc.sh | 24 ++++++++++++++++++++++++ images/linux/ubuntu1604.json | 1 + images/linux/ubuntu1804.json | 1 + images/linux/ubuntu2004.json | 1 + 4 files changed, 27 insertions(+) create mode 100644 images/linux/scripts/installers/oc.sh 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",