Skip to content

Commit

Permalink
Merge pull request #149 from pohly/cluster-logs
Browse files Browse the repository at this point in the history
prow.sh: collect cluster logs
  • Loading branch information
k8s-ci-robot authored May 21, 2021
2 parents 4b03b30 + feb20e2 commit f325590
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions prow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -635,11 +635,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 @@ -1274,7 +1279,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 @@ -1309,7 +1314,7 @@ main () {
fi
fi
fi
delete_cluster_inside_prow_job
delete_cluster_inside_prow_job alpha
fi
fi
Expand Down

0 comments on commit f325590

Please sign in to comment.