Skip to content

Commit

Permalink
Link to build scan in failure notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Apr 10, 2024
1 parent be2a517 commit c05280b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/actions/send-notification/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
branch:
description: 'The branch on which the failure occured'
required: true
build-scan-url:
description: 'The URL of the build scan for the failure'
required: true
owner-ids:
description: 'IDs of the owners to notify'
required: true
Expand All @@ -18,4 +21,4 @@ runs:
steps:
- shell: bash
run: |
curl -s -o /dev/null -X POST '${{ inputs.webhook-url }}' -H 'Content-Type: application/json' -d "{ text: \"${{ inputs.owner-ids }} ${{ inputs.task }} <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|failed> on ${{ inputs.branch }} \"}" || true
curl -s -o /dev/null -X POST '${{ inputs.webhook-url }}' -H 'Content-Type: application/json' -d "{ text: \"${{ inputs.owner-ids }} ${{ inputs.task }} <${{ inputs.build-scan-url }}|failed> on ${{ inputs.branch }} \"}" || true
2 changes: 2 additions & 0 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
mkdir -p ~/.gradle
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
- name: Build
id: build
env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
Expand Down Expand Up @@ -82,3 +83,4 @@ jobs:
task: ${{ inputs.project }}:${{ inputs.task }}
owner-ids: ${{ secrets[env.SECRET_NAME_OWNER_IDS_PROJECT] || secrets[env.SECRET_NAME_OWNER_IDS_GROUP]}}
branch: ${{ inputs.checkout_ref }}
build-scan-url: ${{ steps.build.outputs.build-scan-url }}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
mkdir -p ~/.gradle
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
- name: Build
id: build
env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
Expand Down Expand Up @@ -82,3 +83,4 @@ jobs:
task: ${{ inputs.project }}:${{ inputs.task }}
owner-ids: ${{ secrets[env.SECRET_NAME_OWNER_IDS_PROJECT] || secrets[env.SECRET_NAME_OWNER_IDS_GROUP]}}
branch: ${{ inputs.checkout_ref }}
build-scan-url: ${{ steps.build.outputs.build-scan-url }}

0 comments on commit c05280b

Please sign in to comment.