From e87415470e23da430e9cf6985a467a4db71c742c Mon Sep 17 00:00:00 2001 From: Roger Barker Date: Thu, 5 Dec 2024 09:45:34 -0600 Subject: [PATCH] ci: Add PagerDuty integration to XTS suite and promote build candidate (#16918) Signed-off-by: Roger Barker --- .../workflows/zxcron-extended-test-suite.yaml | 25 +++++++++++++++++++ .../zxcron-promote-build-candidate.yaml | 21 ++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/.github/workflows/zxcron-extended-test-suite.yaml b/.github/workflows/zxcron-extended-test-suite.yaml index f18883c06a2f..e5b89c45c632 100644 --- a/.github/workflows/zxcron-extended-test-suite.yaml +++ b/.github/workflows/zxcron-extended-test-suite.yaml @@ -285,6 +285,31 @@ jobs: with: path: run.log + - name: Report failure (PagerDuty) + run: | + curl --request 'POST' \ + --url 'https://events.pagerduty.com/v2/enqueue' \ + --header 'Content-Type: application/json' \ + --data '{ + "payload": { + "summary": "Hedera Services - eXtended Test Suite Failure", + "severity": "error", + "source": "GitHub Actions - eXtended Test Suite", + "custom_details": { + "Fetch XTS Candidate Tag": "${{ needs.fetch-xts-candidate.result }}", + "Execute eXtended Test Suite": "${{ needs.extended-test-suite.result }}", + "JRS Panel": "${{ needs.abbreviated-panel.result }}", + "Hedera Node JRS Panel": "${{ needs.hedera-node-jrs-panel.result }}", + "Tag as XTS-Passing": "${{ needs.tag-for-promotion.result }}", + "Source Commit": "<${{ github.server_url }}/${{ github.repository }}/commit/${{ needs.fetch-xts-candidate.outputs.xts-tag-commit }}>", + "Commit Author": "${{ needs.fetch-xts-candidate.outputs.xts-tag-commit-author }}", + "Workflow Run": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>" + } + }, + "routing_key": "${{ secrets.PAGERDUTY_CITR_INTEGRATION_KEY }}", + "event_action": "trigger", + }' + - name: Report failure (slack) uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 with: diff --git a/.github/workflows/zxcron-promote-build-candidate.yaml b/.github/workflows/zxcron-promote-build-candidate.yaml index 115b6a1874b5..229ce8f9c197 100644 --- a/.github/workflows/zxcron-promote-build-candidate.yaml +++ b/.github/workflows/zxcron-promote-build-candidate.yaml @@ -230,6 +230,27 @@ jobs: with: egress-policy: audit + - name: Report failure (PagerDuty) + run: | + curl --request 'POST' \ + --url 'https://events.pagerduty.com/v2/enqueue' \ + --header 'Content-Type: application/json' \ + --data '{ + "payload": { + "summary": "Hedera Services - eXtended Test Suite Failure", + "severity": "error", + "source": "GitHub Actions - eXtended Test Suite", + "custom_details": { + "Fetch Latest Build Candidate": "${{ needs.determine-build-candidate.result }}", + "Promote Build Candidate": "${{ needs.promote-build-candidate.result }}", + "Source Commit": "<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}>", + "Workflow Run": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>" + } + }, + "routing_key": "${{ secrets.PAGERDUTY_CITR_INTEGRATION_KEY }}", + "event_action": "trigger", + }' + - name: Report failure (slack) uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 with: