Skip to content

Commit

Permalink
added Slack notification
Browse files Browse the repository at this point in the history
  • Loading branch information
daynewlee committed Feb 16, 2024
1 parent 61f3a7f commit 02ae178
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -512,3 +512,13 @@ jobs:

- name: upload-dumps-for-downstream
run: ./scripts/ci/jobs/upload-dumps-for-embedding.sh

send-notification:
needs:
- diff-dumps
runs-on: ubuntu-latest
if: failure()
steps:
- name: Send Slack notification on workflow failure
run: |
curl -X POST -H 'Content-type: application/json' --data '{"text":"<${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}|Workflow ${{ github.workflow }}> failed in repository ${{ github.repository }}: Failed to update offline vulnerabilities"}' ${{ secrets.SLACK_ONCALL_SCANNER_WEBHOOK }}
1 change: 1 addition & 0 deletions scripts/ci/jobs/diff-dumps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ upload_offline_dump() {
echo "$file_to_check added to scanner-vuln-updates.zip"
else
echo "$file_to_check does not exist."
exit 1
fi
"${cmd[@]}" gsutil cp scanner-vuln-updates.zip gs://scanner-support-public/offline/v1/scanner-vuln-updates.zip
}
Expand Down

0 comments on commit 02ae178

Please sign in to comment.