Skip to content

Commit

Permalink
Merge pull request #21373 from indeewari/21_test_runner_status_check
Browse files Browse the repository at this point in the history
Fixing JDK 21 runner status check
  • Loading branch information
indeewari authored Oct 16, 2024
2 parents bfd39bb + c5c75bf commit 92e0894
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/product-is-builder-jdk21.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,32 @@ jobs:
ls
cd modules/integration/
mvn clean install --batch-mode | tee mvn-build.log
PR_BUILD_STATUS=$(cat mvn-build.log | grep "\[INFO\] BUILD" | grep -oE '[^ ]+$')
PR_TEST_RESULT=$(sed -n -e '/\[INFO\] Results:/,/\[INFO\] Tests run:/ p' mvn-build.log)
PR_BUILD_FINAL_RESULT=$(
echo "==========================================================="
echo "product-is BUILD $PR_BUILD_STATUS"
echo "=========================================================="
echo ""
echo "$PR_TEST_RESULT"
)
PR_BUILD_RESULT_LOG_TEMP=$(echo "$PR_BUILD_FINAL_RESULT" | sed 's/$/%0A/')
PR_BUILD_RESULT_LOG=$(echo $PR_BUILD_RESULT_LOG_TEMP)
echo "::warning::$PR_BUILD_RESULT_LOG"
PR_BUILD_SUCCESS_COUNT=$(grep -o -i "\[INFO\] BUILD SUCCESS" mvn-build.log | wc -l)
if [ "$PR_BUILD_SUCCESS_COUNT" != "3" ]; then
echo "Success Count $PR_BUILD_SUCCESS_COUNT"
if [ "$PR_BUILD_SUCCESS_COUNT" != "11" ]; then
echo "PR BUILD not successfull. Aborting."
echo "::error::PR BUILD not successfull. Check artifacts for logs."
exit 1
fi
echo ""
echo "=========================================================="
echo "Build completed"
echo "=========================================================="
echo ""

0 comments on commit 92e0894

Please sign in to comment.