mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-26 16:46:58 +00:00
track failures on Datadog (#5020)
This commit is contained in:
parent
c5f0f820cf
commit
b69f0b3dd5
81
.github/workflows/license_compliance.yml
vendored
81
.github/workflows/license_compliance.yml
vendored
@ -55,59 +55,36 @@ jobs:
|
|||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
run: echo "${{ steps.license_check_report.outputs.report }}"
|
run: echo "${{ steps.license_check_report.outputs.report }}"
|
||||||
|
|
||||||
- uses: slackapi/slack-github-action@v1.23.0
|
- name: Calculate alert data
|
||||||
if: failure() && github.ref == 'refs/heads/main'
|
id: calculator
|
||||||
with:
|
shell: bash
|
||||||
payload: |
|
if: (success() || failure()) && github.ref_name == 'main'
|
||||||
{
|
run: |
|
||||||
"blocks": [
|
if [ "${{ job.status }}" = "success" ]; then
|
||||||
{
|
echo "alert_type=success" >> "$GITHUB_OUTPUT";
|
||||||
"type": "context",
|
else
|
||||||
"elements": [
|
echo "alert_type=error" >> "$GITHUB_OUTPUT";
|
||||||
{
|
fi
|
||||||
"type": "image",
|
|
||||||
"image_url": "https://avatars.githubusercontent.com/u/${{ github.actor_id }}?v=4",
|
|
||||||
"alt_text": "Actor"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "mrkdwn",
|
|
||||||
"text": "*<https://github.com/${{ github.actor }}|${{ github.actor }}>*"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "section",
|
|
||||||
"text": {
|
|
||||||
"type": "mrkdwn",
|
|
||||||
"text": "Job ${{ github.job }} in workflow <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/workflow/|${{ github.workflow }}>"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "context",
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "mrkdwn",
|
|
||||||
"text": "Triggered by ${{ github.event_name }} for ${{ github.ref_type }} `${{ github.ref_name }}`"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "context",
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "image",
|
|
||||||
"image_url": "https://github.githubassets.com/favicons/favicon.png",
|
|
||||||
"alt_text": "Github logo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "mrkdwn",
|
|
||||||
"text": "<https://github.com/${{ github.repository }}/|${{ github.repository }}> Run <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}/|#${{ github.run_number }} | Attempt #${{ github.run_attempt }}>"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
- name: Send event to Datadog
|
||||||
|
if: (success() || failure()) && github.ref_name == 'main'
|
||||||
|
uses: masci/datadog@v1
|
||||||
|
with:
|
||||||
|
api-key: ${{ secrets.CORE_DATADOG_API_KEY }}
|
||||||
|
api-url: https://api.datadoghq.eu
|
||||||
|
events: |
|
||||||
|
- title: "${{ github.workflow }} workflow"
|
||||||
|
text: "License compliance check failed:\n ${{ steps.license_check_report.outputs.report }}"
|
||||||
|
alert_type: "${{ steps.calculator.outputs.alert_type }}"
|
||||||
|
source_type_name: "Github"
|
||||||
|
host: ${{ github.repository_owner }}
|
||||||
|
tags:
|
||||||
|
- "project:${{ github.repository }}"
|
||||||
|
- "job:${{ github.job }}"
|
||||||
|
- "run_id:${{ github.run_id }}"
|
||||||
|
- "workflow:${{ github.workflow }}"
|
||||||
|
- "branch:${{ github.ref_name }}"
|
||||||
|
- "url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||||
|
|
||||||
license_check_vanilla:
|
license_check_vanilla:
|
||||||
name: Core dependencies, no extras
|
name: Core dependencies, no extras
|
||||||
|
Loading…
x
Reference in New Issue
Block a user