Fix helm command not found issue when kubeconfig is not provided.

This commit is contained in:
Ta-Ching Chen
2018-11-20 17:24:37 +08:00
parent 52b736c892
commit 4a8c200c37
3 changed files with 17 additions and 17 deletions
+15 -15
View File
@@ -6,13 +6,6 @@
set -e
# If we don't have gcloud credentials, bail out of these tests.
if [ -z "$FISSION_CI_SERVICE_ACCOUNT" ]
then
echo "Skipping tests, no cluster credentials"
exit 0
fi
K8SCLI_DIR=$HOME/k8scli
if [ ! -d $K8SCLI_DIR ]
@@ -20,14 +13,6 @@ then
mkdir -p $K8SCLI_DIR
fi
# Get kubectl
if [ ! -f $K8SCLI_DIR/kubectl ]
then
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
mv kubectl $K8SCLI_DIR/kubectl
fi
# Get helm
if [ ! -f $K8SCLI_DIR/helm ]
then
@@ -36,6 +21,21 @@ then
mv linux-amd64/helm $K8SCLI_DIR/helm
fi
# If we don't have gcloud credentials, bail out of these tests.
if [ -z "$FISSION_CI_SERVICE_ACCOUNT" ]
then
echo "Skipping tests, no cluster credentials"
exit 0
fi
# Get kubectl
if [ ! -f $K8SCLI_DIR/kubectl ]
then
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
mv kubectl $K8SCLI_DIR/kubectl
fi
mkdir ${HOME}/.kube
# echo $KUBECONFIG_CONTENTS | base64 -D - > ${HOME}/.kube/config