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 <[email protected]>
  • Loading branch information
mucahitkurt committed Nov 16, 2019
1 parent 4fcafec commit a688be9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions prow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,14 @@ EOF
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
unset KUBECONFIG
}

# 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 +1025,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 +1056,7 @@ main () {
fi
fi
fi
delete_cluster
fi
fi

Expand Down

0 comments on commit a688be9

Please sign in to comment.