Fix helm command not found issue when kubeconfig is not provided.
This commit is contained in:
+15
-15
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user