Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
ci.ocp: Add debug output on HTTP service failure
Browse files Browse the repository at this point in the history
these logs are vital to analyze a setup failure.

Signed-off-by: Lukáš Doktor <[email protected]>
  • Loading branch information
ldoktor committed Feb 21, 2024
1 parent a10a1e2 commit 9060e93
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .ci/openshift-ci/run_smoke_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,26 @@ else
fi

info "Wait for the HTTP server to respond"
check_cmd="curl -vvv '${host}:${port}${hello_file}' 2>&1 | grep -q '$hello_msg'"
tempfile=$(mktemp)
check_cmd="curl -vvv '${host}:${port}${hello_file}' 2>&1 | tee -a '$tempfile' | grep -q '$hello_msg'"
if waitForProcess 60 1 "${check_cmd}"; then
test_status=0
info "HTTP server is working"
else
test_status=1
echo "::error:: HTTP server not working"
echo "::group::Output of the \"curl -vvv '${host}:${port}${hello_file}'\""
cat "${tempfile}"
echo "::endgroup::"
echo "::group::Describe kube-system namespace"
oc describe -n kube-system all
echo "::endgroup::"
echo "::group::Descibe current namespace"
oc describe all
echo "::endgroup::"
info "HTTP server is unreachable"
fi
rm -f "$tempfile"

# Delete the resources.
#
Expand Down

0 comments on commit 9060e93

Please sign in to comment.