From a3925c86fe7f36015eedf3c862f5fc20c86f6dae Mon Sep 17 00:00:00 2001 From: Grant Zukel Date: Tue, 7 May 2024 12:09:43 -0600 Subject: [PATCH] updated check with loop --- .github/workflows/publish-release.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 4726d68fcc..9e96867ea8 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -407,8 +407,19 @@ jobs: echo "* *" echo "* *" echo "***********************************" - docker logs $container_id || echo "no logs" - exit 0 + docker_logs=$(docker logs $container_id || echo "no logs") + docker_logs_check=$(echo "${docker_logs}" | grep "e2e tests completed" | grep -v grep) + if [ ! -z "${docker_logs_check}" ]; then + docker logs $container_id || echo "no logs" + echo "${docker_logs_check}" + echo "Testing Succeeded." + exit 0 + else + docker logs $container_id || echo "no logs" + echo "${docker_logs_check}" + echo "Testing failed, didn't find th completed message in the logs." + exit 1 + fi else echo "Testing in progress still...." if [ "${{ github.event.inputs.debug }}" == "true" ]; then