Skip to content

Commit

Permalink
delete kind cluster after tests run
Browse files Browse the repository at this point in the history
Signed-off-by: Mucahit Kurt <mucahitkurt@gmail.com>
  • Loading branch information
mucahitkurt committed Nov 14, 2019
1 parent 5ce1e19 commit ca2366b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion release-tools/prow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,12 @@ EOF
KUBECONFIG="$(kind get kubeconfig-path --name=csi-prow)"
export KUBECONFIG
}

# Deletes kind cluster
delete_cluster() {
if kind get clusters | grep -q csi-prow; then
run kind delete cluster --name=csi-prow || die "kind delete failed"
fi
}
# Looks for the deployment as specified by CSI_PROW_DEPLOYMENT and CSI_PROW_KUBERNETES_VERSION
# in the given directory.
find_deployment () {
Expand Down Expand Up @@ -1017,6 +1022,7 @@ main () {
fi
fi
fi
delete_cluster
fi

if tests_need_alpha_cluster && [ "${CSI_PROW_E2E_ALPHA_GATES}" ]; then
Expand Down Expand Up @@ -1047,6 +1053,7 @@ main () {
fi
fi
fi
delete_cluster
fi
fi

Expand Down

0 comments on commit ca2366b

Please sign in to comment.