modfied to install kubectl snap and create softlink to run the 39/33739/2
authorNarinder Gupta <narinder.gupta@canonical.com>
Tue, 25 Apr 2017 03:59:03 +0000 (22:59 -0500)
committerNarinder Gupta <narinder.gupta@canonical.com>
Tue, 25 Apr 2017 04:22:39 +0000 (23:22 -0500)
command

Change-Id: I3a89247eb0307ab25ce8b9106c8d26c272b46195
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
ci/k8.sh

index 3058933..a927422 100755 (executable)
--- a/ci/k8.sh
+++ b/ci/k8.sh
@@ -4,7 +4,15 @@ juju run-action kubernetes-worker/0 microbot replicas=3
 sleep 30
 mkdir -p ~/.kube || true
 juju scp kubernetes-master/0:config ~/.kube/config || true
-juju scp kubernetes-master/0:kubectl ./kubectl || true
+
+if [ ! -f /snap/kubectl/current/kubectl ]; then
+  sudo snap install kubectl --classic
+fi
+
+if [ ! -f ./kubectl ]; then
+  ln -s /snap/kubectl/current/kubectl ./kubectl
+fi
+
 ./kubectl cluster-info || true
 juju config kubernetes-master enable-dashboard-addons=true || true
 #./kubectl proxy