Modify installation of kustomize 33/833/1
authorYolanda Robla <yroblamo@redhat.com>
Fri, 24 May 2019 17:25:57 +0000 (19:25 +0200)
committerYolanda Robla <yroblamo@redhat.com>
Fri, 24 May 2019 17:26:49 +0000 (19:26 +0200)
Download an already compiled kustomize version, to
pin to an stable release instead of latest.

Change-Id: I1afecb6aa35a0ef07cb7a7a8acefeceb029e3dcb

Makefile
utils/install_dependencies.sh [new file with mode: 0755]

index 4f11ee0..0f1cc1a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,7 @@ clean:
 
 dependencies:
        @echo "Installing dependencies"
-       @GOPATH=$(GOPATH) GOBIN=$(GOBIN) go get sigs.k8s.io/kustomize
+       @./utils/install_dependencies.sh
        @wget -A "openshift-client-linux-4*\.tar\.gz" -r -np -nc -nd -l1 --no-check-certificate -e robots=off https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/ -P /tmp/
        @sudo tar -xvf /tmp/openshift-client-linux-4*.tar.gz -C /usr/local/bin/ oc
        @rm -f /tmp/openshift-client-linux-4*.tar.gz
diff --git a/utils/install_dependencies.sh b/utils/install_dependencies.sh
new file mode 100755 (executable)
index 0000000..4c8af30
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+URL=$(curl https://api.github.com/repos/kubernetes-sigs/kustomize/releases/latest |grep browser_download | grep linux | cut -d '"' -f 4)
+sudo -E curl -L $URL -o /usr/local/bin/kustomize
+sudo chmod u+x /usr/local/bin/kustomize
+
+wget -A "openshift-client-linux-4*\.tar\.gz" -r -np -nc -nd -l1 --no-check-certificate -e robots=off https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/ -P /tmp/
+sudo tar -xvf /tmp/openshift-client-linux-4*.tar.gz -C /usr/local/bin/ oc
+rm -f /tmp/openshift-client-linux-4*.tar.gz
+