Unverified Commit 8cb9587d authored by Anant Sharma's avatar Anant Sharma Committed by GitHub
Browse files

fix: include framework name in Slack failure notifications (#7472)


Signed-off-by: default avatarAnant Sharma <anants@nvidia.com>
parent d92d5c77
...@@ -103,7 +103,7 @@ jobs: ...@@ -103,7 +103,7 @@ jobs:
"https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs?per_page=100" \ "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs?per_page=100" \
>$JOBS_JSON >$JOBS_JSON
FAILED_JOBS=$(jq -r '.jobs[] | select(.conclusion == "failure") | ":failed: " + (.name | split(" / ") | .[-1]) + "\\n"' "$JOBS_JSON") FAILED_JOBS=$(jq -r '.jobs[] | select(.conclusion == "failure") | .name | split(" / ") | if length > 2 then ":failed: " + .[0] + " > " + .[-1] else ":failed: " + .[-1] end | . + "\\n"' "$JOBS_JSON")
echo $FAILED_JOBS echo $FAILED_JOBS
{ {
echo "FAILED_JOBS<<EOF" echo "FAILED_JOBS<<EOF"
......
...@@ -517,7 +517,7 @@ jobs: ...@@ -517,7 +517,7 @@ jobs:
"https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs?per_page=100" \ "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs?per_page=100" \
>$JOBS_JSON >$JOBS_JSON
FAILED_JOBS=$(jq -r '.jobs[] | select(.conclusion == "failure") | ":failed: " + (.name | split(" / ") | .[-1]) + "\\n"' "$JOBS_JSON") FAILED_JOBS=$(jq -r '.jobs[] | select(.conclusion == "failure") | .name | split(" / ") | if length > 2 then ":failed: " + .[0] + " > " + .[-1] else ":failed: " + .[-1] end | . + "\\n"' "$JOBS_JSON")
echo $FAILED_JOBS echo $FAILED_JOBS
{ {
echo "FAILED_JOBS<<EOF" echo "FAILED_JOBS<<EOF"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment