From 12eb9558aaabba7a4b11395e6827cf310adc20ca Mon Sep 17 00:00:00 2001 From: PhilWindle <60546371+PhilWindle@users.noreply.github.com> Date: Thu, 2 Oct 2025 10:53:04 +0000 Subject: [PATCH] chore: Alert slack on staging/testnet deployment failure This PR enables slask alerts when staging/testnet deployments fail Fixes [A-96](https://linear.app/aztec-labs/issue/A-96/get-alerts-in-slack-when-network-deployments-fail) Co-authored-by: Phil Windle --- .github/workflows/deploy-staging-network.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/deploy-staging-network.yml b/.github/workflows/deploy-staging-network.yml index 25a217930bf9..84a2f5b76fb6 100644 --- a/.github/workflows/deploy-staging-network.yml +++ b/.github/workflows/deploy-staging-network.yml @@ -138,3 +138,21 @@ jobs: run: | echo "Updating monitoring app for testnet deployment..." ./spartan/metrics/testnet-monitor/scripts/update-monitoring.sh testnet ${{ env.MONITORING_NAMESPACE }} + + - name: Notify Slack on failure + if: failure() && env.MAJOR_VERSION == '2' + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + run: | + if [ -n "${SLACK_BOT_TOKEN}" ]; then + read -r -d '' data <" + } + EOF + curl -X POST https://slack.com/api/chat.postMessage \ + -H "Authorization: Bearer $SLACK_BOT_TOKEN" \ + -H "Content-type: application/json" \ + --data "$data" + fi