Skip to content

Commit ae6dfaa

Browse files
adrientheboroboquat
authored andcommitted
[installer/tests] upload diagnostics when installation fails
1 parent 25f2cea commit ae6dfaa

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

install/tests/Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,22 @@ delete-cm-setup:
401401
sleep ${waittime} && kubectl --kubeconfig=${KUBECONFIG} delete pods --all -n cert-manager && sleep ${sleeptime};
402402

403403
gitpod-debug-info:
404-
@echo "Gitpod is not ready"
404+
@echo -e "\033[;31mGitpod is not ready\033[0;m"
405405
@kubectl --kubeconfig=${KUBECONFIG} get pods -n gitpod
406406
@kubectl --kubeconfig=${KUBECONFIG} get certificate -n gitpod
407+
@echo "Uploading diagnostics to gs://nightly-tests/nightly-tests-errors/${TF_VAR_TEST_ID}"
408+
409+
kubectl kots --kubeconfig=${KUBECONFIG} --namespace gitpod get app gitpod
410+
411+
kubectl --kubeconfig=${KUBECONFIG} --namespace gitpod get pod -ojson > pods.json \
412+
&& gsutil cp pods.json gs://nightly-tests/nightly-tests-errors/${TF_VAR_TEST_ID}/pods.json
413+
414+
kubectl --kubeconfig=${KUBECONFIG} --namespace gitpod get event --sort-by '.metadata.creationTimestamp' > events.log \
415+
&& gsutil cp events.log gs://nightly-tests/nightly-tests-errors/${TF_VAR_TEST_ID}/events.log
416+
417+
kubectl --kubeconfig=${KUBECONFIG} --namespace gitpod describe certificate https-certificates > cert.log \
418+
&& gsutil cp cert.log gs://nightly-tests/nightly-tests-errors/${TF_VAR_TEST_ID}/cert.log
419+
407420

408421
check-kots-app:
409422
kubectl kots get --kubeconfig=${KUBECONFIG} app gitpod -n gitpod | grep gitpod | awk '{print $$2}' | grep "ready" || { $(MAKE) gitpod-debug-info; exit 1; }

0 commit comments

Comments
 (0)