File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 4545 mvn $MVN_ARGS "-Daicore.landscape=${{ matrix.environment }}" | tee mvn_output.log # tee writes to both the console and a file
4646
4747 awk '/Results:/, /----/' mvn_output.log > test_error.log || true # true ensures the step doesn't fail if no match is found.
48- ERROR_MSG=$(cat test_error.log | tail +4 | head -n -4 | sed ':a;N;$!ba;s/\n/\\n/g') # Slack formatting
48+ ERROR_MSG=$(cat test_error.log | tail +4 | head -n -4 | awk '{gsub(/"/, "\\\""); printf "%s\\n", $0}') # Slack formatting
49+ echo "error_message=$ERROR_MSG"
4950 echo "error_message=$ERROR_MSG" >> $GITHUB_OUTPUT
5051
5152 if grep -q "BUILD FAILURE" mvn_output.log; then
8990 webhook : ${{ secrets.SLACK_WEBHOOK }}
9091 webhook-type : incoming-webhook
9192 payload : |
92- {
93- "text": "⚠️ End-to-end tests failed! 😬 Please inspect & fix by clicking <https://github.com/SAP/ai-sdk-java/actions/runs/${{ github.run_id }}|here>\n\n*Test Errors:*\n${{ steps.run_tests.outputs.error_message }}"
94- }
95-
93+ text: "⚠️ End-to-end tests failed! 😬 Please inspect & fix by clicking <https://github.com/SAP/ai-sdk-java/actions/runs/${{ github.run_id }}|here>",
94+ blocks:
95+ - type: "section"
96+ text:
97+ type: "plain_text"
98+ text: "${{ steps.run_tests.outputs.error_message }}"
You can’t perform that action at this time.
0 commit comments