diff --git a/Makefile b/Makefile index b366dc51de..e638d0d146 100644 --- a/Makefile +++ b/Makefile @@ -240,7 +240,7 @@ update/gomod: .PHONY: update/shfmt update/shfmt: bin/shfmt - ./bin/shfmt -w -i 2 -d . + ./bin/shfmt -w -i 2 -d ./hack/ ## Verifiers # Linters and similar diff --git a/hack/e2e/kops/kops.sh b/hack/e2e/kops/kops.sh index 4f34c3580b..3dbc6d3bd8 100644 --- a/hack/e2e/kops/kops.sh +++ b/hack/e2e/kops/kops.sh @@ -119,7 +119,7 @@ function kops_patch_cluster_file() { jq "$FILTER" "$CLUSTER_FILE_JSON" >"$CLUSTER_FILE_0" # Patch only the json objects - kubectl patch -f "$CLUSTER_FILE_0" --local --type merge --patch "$(cat "$KOPS_PATCH_FILE")" -o json >"$CLUSTER_FILE_1" + kubectl patch --kubeconfig /dev/null -f "$CLUSTER_FILE_0" --local --type merge --patch "$(cat "$KOPS_PATCH_FILE")" -o json >"$CLUSTER_FILE_1" mv "$CLUSTER_FILE_1" "$CLUSTER_FILE_0" # Delete the original json objects, add the patched @@ -141,7 +141,7 @@ function kops_patch_cluster_file() { function yaml_to_json() { IN=${1} OUT=${2} - kubectl patch -f "$IN" --local -p "{}" --type merge -o json | jq '.' -s >"$OUT" + kubectl patch --kubeconfig /dev/null -f "$IN" --local -p "{}" --type merge -o json | jq '.' -s >"$OUT" } function json_to_yaml() { diff --git a/hack/prow-e2e.sh b/hack/prow-e2e.sh index 57a13b110b..7469a3e5f0 100755 --- a/hack/prow-e2e.sh +++ b/hack/prow-e2e.sh @@ -60,9 +60,12 @@ export KOPS_BUCKET=${KOPS_BUCKET:-"k8s-kops-csi-shared-e2e"} # Always use us-west-2 in CI, no matter where the local client is export AWS_REGION=us-west-2 -make cluster/create || exit 1 -make e2e/${TEST} -E2E_PASSED=$? +if make cluster/create; then + make e2e/${TEST} + E2E_PASSED=$? +else + E2E_PASSED=1 +fi make cluster/delete echo "E2E_PASSED: ${E2E_PASSED}"