diff --git a/.github/workflows/product-is-builder-jdk17.yml b/.github/workflows/product-is-builder-jdk17.yml index 3d0c722a64..058a1315d3 100644 --- a/.github/workflows/product-is-builder-jdk17.yml +++ b/.github/workflows/product-is-builder-jdk17.yml @@ -39,8 +39,10 @@ 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" @@ -48,12 +50,21 @@ jobs: 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 "" \ No newline at end of file