From 1148759a946ac8c9a3bf195b47706de2e2e7ee43 Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Fri, 5 Aug 2022 21:38:14 -0400 Subject: [PATCH] ci: Update nightly E2E notifications (#9177) --- .github/workflows/e2e-nightly-34x.yml | 55 ++++++++++++++++++++++---- .github/workflows/e2e-nightly-main.yml | 55 ++++++++++++++++++-------- .github/workflows/fuzz-nightly.yml | 33 +++++++++++----- 3 files changed, 110 insertions(+), 33 deletions(-) diff --git a/.github/workflows/e2e-nightly-34x.yml b/.github/workflows/e2e-nightly-34x.yml index eedb745ee..2da8e0664 100644 --- a/.github/workflows/e2e-nightly-34x.yml +++ b/.github/workflows/e2e-nightly-34x.yml @@ -47,12 +47,51 @@ jobs: runs-on: ubuntu-latest steps: - name: Notify Slack on failure - uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 + uses: slackapi/slack-github-action@v1.21.0 env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: tendermint-internal - SLACK_USERNAME: Nightly E2E Tests - SLACK_ICON_EMOJI: ':skull:' - SLACK_COLOR: danger - SLACK_MESSAGE: Nightly E2E tests failed on v0.34.x - SLACK_FOOTER: '' + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + with: + payload: | + { + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ":skull: Nightly E2E tests for `${{ github.ref_name }}` failed." + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "See the <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|run details> and the <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|commit> that caused the failure." + } + } + ] + } + + e2e-nightly-success: # may turn this off once they seem to pass consistently + needs: e2e-nightly-test + if: ${{ success() }} + runs-on: ubuntu-latest + steps: + - name: Notify Slack on success + uses: slackapi/slack-github-action@v1.21.0 + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + with: + payload: | + { + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ":white_check_mark: Nightly E2E tests for `${{ github.ref_name }}` passed." + } + } + ] + } diff --git a/.github/workflows/e2e-nightly-main.yml b/.github/workflows/e2e-nightly-main.yml index 9e5f66e1c..f1ac09e74 100644 --- a/.github/workflows/e2e-nightly-main.yml +++ b/.github/workflows/e2e-nightly-main.yml @@ -46,15 +46,30 @@ jobs: runs-on: ubuntu-latest steps: - name: Notify Slack on failure - uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 + uses: slackapi/slack-github-action@v1.21.0 env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: tendermint-internal - SLACK_USERNAME: Nightly E2E Tests - SLACK_ICON_EMOJI: ':skull:' - SLACK_COLOR: danger - SLACK_MESSAGE: Nightly E2E tests failed on main - SLACK_FOOTER: '' + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + with: + payload: | + { + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ":skull: Nightly E2E tests for `${{ github.ref_name }}` failed." + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "See the <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|run details> and the <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|commit> that caused the failure." + } + } + ] + } e2e-nightly-success: # may turn this off once they seem to pass consistently needs: e2e-nightly-test @@ -62,12 +77,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Notify Slack on success - uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 + uses: slackapi/slack-github-action@v1.21.0 env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: tendermint-internal - SLACK_USERNAME: Nightly E2E Tests - SLACK_ICON_EMOJI: ':white_check_mark:' - SLACK_COLOR: good - SLACK_MESSAGE: Nightly E2E tests passed on main - SLACK_FOOTER: '' + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + with: + payload: | + { + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ":white_check_mark: Nightly E2E tests for `${{ github.ref_name }}` passed." + } + } + ] + } diff --git a/.github/workflows/fuzz-nightly.yml b/.github/workflows/fuzz-nightly.yml index c98ba64bf..52062917f 100644 --- a/.github/workflows/fuzz-nightly.yml +++ b/.github/workflows/fuzz-nightly.yml @@ -75,13 +75,28 @@ jobs: if: ${{ needs.fuzz-nightly-test.outputs.crashers-count != 0 }} runs-on: ubuntu-latest steps: - - name: Notify Slack if any crashers - uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 + - name: Notify Slack on failure + uses: slackapi/slack-github-action@v1.21.0 env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: tendermint-internal - SLACK_USERNAME: Nightly Fuzz Tests - SLACK_ICON_EMOJI: ':firecracker:' - SLACK_COLOR: danger - SLACK_MESSAGE: Crashers found in Nightly Fuzz tests - SLACK_FOOTER: '' + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + with: + payload: | + { + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ":skull: Nightly fuzz tests for `${{ github.ref_name }}` failed.", + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "See the <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|run details> and the <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|commit> that caused the failure.", + } + } + ] + }