Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prow.sh: collect cluster logs #149

Merged
merged 1 commit into from May 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions prow.sh
Expand Up @@ -621,11 +621,16 @@ EOF

# Deletes kind cluster inside a prow job
delete_cluster_inside_prow_job() {
local name="$1"

# Inside a real Prow job it is better to clean up at runtime
# instead of leaving that to the Prow job cleanup code
# because the later sometimes times out (https://github.com/kubernetes-csi/csi-release-tools/issues/24#issuecomment-554765872).
#
# This is also a good time to collect logs.
if [ "$JOB_NAME" ]; then
if kind get clusters | grep -q csi-prow; then
run kind export logs --name=csi-prow "${ARTIFACTS}/cluster-logs/$name"
run kind delete cluster --name=csi-prow || die "kind delete failed"
fi
unset KUBECONFIG
Expand Down Expand Up @@ -1210,7 +1215,7 @@ main () {
fi
fi
fi
delete_cluster_inside_prow_job
delete_cluster_inside_prow_job non-alpha
fi

if tests_need_alpha_cluster && [ "${CSI_PROW_E2E_ALPHA_GATES}" ]; then
Expand Down Expand Up @@ -1245,7 +1250,7 @@ main () {
fi
fi
fi
delete_cluster_inside_prow_job
delete_cluster_inside_prow_job alpha
fi
fi

Expand Down