From e02298eb5a275380e7c8aa63dcce49974fc871a2 Mon Sep 17 00:00:00 2001 From: marcPineiroAave <107112627+marcPineiroAave@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:08:03 +0100 Subject: [PATCH 01/12] Add notify faliure to build-fork workflow --- .github/workflows/build-fork.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/build-fork.yml b/.github/workflows/build-fork.yml index 0f8ee0b92b..0161d2d307 100644 --- a/.github/workflows/build-fork.yml +++ b/.github/workflows/build-fork.yml @@ -25,3 +25,19 @@ jobs: - name: Upload artifacts uses: ./.github/actions/upload-artifacts + + NotifyFailure: + needs: [build] + runs-on: [self-hosted] + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' From c0e1b945a90d64ae7277da73eda3a2cb27249bcb Mon Sep 17 00:00:00 2001 From: marcPineiroAave <107112627+marcPineiroAave@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:17:59 +0100 Subject: [PATCH 02/12] Added mattermost notify failure Added job to notify failure of the workflow to a mattermost channel. --- .github/workflows/build-test-deploy.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index 5bdb992ed6..dc99e51b1f 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -296,3 +296,19 @@ jobs: with: PINATA_HASH: '${{ needs.deploy.outputs.pinata_hash }}' secrets: inherit + + NotifyFailure: + needs: [update_domains_no_cypress,update_domains,cypress_app_functionality,cypress_additional_v3,cypress_additional_v2,cypress_full_v3,cypress_full_v2,deploy,next_js_analyze,cypress_smoke_v3,cypress_smoke_v2,build_staging,build] + runs-on: [self-hosted] + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' From b03dd937e35c747feaaa7eb511924b4a8a2a61ee Mon Sep 17 00:00:00 2001 From: marcPineiroAave <107112627+marcPineiroAave@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:19:30 +0100 Subject: [PATCH 03/12] Added notify failure to mattermost job Added a job to notify to a mattermost channel in case of failure --- .github/workflows/crowdin-download.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/crowdin-download.yml b/.github/workflows/crowdin-download.yml index d1187147a5..160b70c36b 100644 --- a/.github/workflows/crowdin-download.yml +++ b/.github/workflows/crowdin-download.yml @@ -54,3 +54,19 @@ jobs: git push exit fi + + NotifyFailure: + needs: [download-from-crowdin] + runs-on: [self-hosted] + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' From dd18829e8813544e251946833ec2fe5271ea2487 Mon Sep 17 00:00:00 2001 From: marcPineiroAave <107112627+marcPineiroAave@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:20:48 +0100 Subject: [PATCH 04/12] Added notify failure to mattermost job Added job to notify to a mattermost channel in case of failure. --- .github/workflows/crowdin-upload.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/crowdin-upload.yml b/.github/workflows/crowdin-upload.yml index 5ebbd717a3..8b0acc0ee1 100644 --- a/.github/workflows/crowdin-upload.yml +++ b/.github/workflows/crowdin-upload.yml @@ -29,3 +29,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_TOKEN }} + + NotifyFailure: + needs: [upload-to-crowdin] + runs-on: ubuntu-latest + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' From 451a1ec09d0df7e2e412e2ebdcf8fc8029007a0b Mon Sep 17 00:00:00 2001 From: marcPineiroAave <107112627+marcPineiroAave@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:21:31 +0100 Subject: [PATCH 05/12] Updated runner option --- .github/workflows/build-fork.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-fork.yml b/.github/workflows/build-fork.yml index 0161d2d307..f2b2c081f8 100644 --- a/.github/workflows/build-fork.yml +++ b/.github/workflows/build-fork.yml @@ -28,7 +28,7 @@ jobs: NotifyFailure: needs: [build] - runs-on: [self-hosted] + runs-on: ubuntu-latest if: ${{ failure() }} steps: - id: text From a8b33d0875e46afb3c4c6138327de5f105c75309 Mon Sep 17 00:00:00 2001 From: marcPineiroAave <107112627+marcPineiroAave@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:21:57 +0100 Subject: [PATCH 06/12] Udated runner option --- .github/workflows/build-test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index dc99e51b1f..70ee24d8a9 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -299,7 +299,7 @@ jobs: NotifyFailure: needs: [update_domains_no_cypress,update_domains,cypress_app_functionality,cypress_additional_v3,cypress_additional_v2,cypress_full_v3,cypress_full_v2,deploy,next_js_analyze,cypress_smoke_v3,cypress_smoke_v2,build_staging,build] - runs-on: [self-hosted] + runs-on: ubuntu-latest if: ${{ failure() }} steps: - id: text From e6cf277c5d09835e996a35f312561c11dbbe406a Mon Sep 17 00:00:00 2001 From: marcPineiroAave <107112627+marcPineiroAave@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:22:17 +0100 Subject: [PATCH 07/12] Fixed runner option --- .github/workflows/crowdin-download.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/crowdin-download.yml b/.github/workflows/crowdin-download.yml index 160b70c36b..c0b6ac12f8 100644 --- a/.github/workflows/crowdin-download.yml +++ b/.github/workflows/crowdin-download.yml @@ -57,7 +57,7 @@ jobs: NotifyFailure: needs: [download-from-crowdin] - runs-on: [self-hosted] + runs-on: ubuntu-latest if: ${{ failure() }} steps: - id: text From 9f6078cb5450ac2c184a7117baf0824b8cec9779 Mon Sep 17 00:00:00 2001 From: marcPineiroAave <107112627+marcPineiroAave@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:23:29 +0100 Subject: [PATCH 08/12] Added notify failure to mattermost job Added job to notify failure to a mattermost channel --- .github/workflows/dependency-review.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index fe461b4243..f50ccd7929 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -18,3 +18,19 @@ jobs: uses: actions/checkout@v3 - name: 'Dependency Review' uses: actions/dependency-review-action@v2 + + NotifyFailure: + needs: [dependency-review] + runs-on: ubuntu-latest + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' From be4e3b164e161a99787772686e62ee41b16f8729 Mon Sep 17 00:00:00 2001 From: marcPineiroAave <107112627+marcPineiroAave@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:24:26 +0100 Subject: [PATCH 09/12] Added notify failure mattermost job Added job to notify failure to a mattermost channel --- .github/workflows/i18n-check.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/i18n-check.yml b/.github/workflows/i18n-check.yml index 01e55df016..aee5aa7788 100644 --- a/.github/workflows/i18n-check.yml +++ b/.github/workflows/i18n-check.yml @@ -32,3 +32,19 @@ jobs: exit 1 exit fi + + NotifyFailure: + needs: [i18n-check] + runs-on: [self-hosted] + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' From e692019b54d3b1f99f0e0e481fbda5f200138300 Mon Sep 17 00:00:00 2001 From: marcPineiroAave <107112627+marcPineiroAave@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:27:38 +0100 Subject: [PATCH 10/12] Added notify failure to mattermost job Added job to notify a mattermost channel in case of failure --- .github/workflows/test-deploy-fork.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/test-deploy-fork.yml b/.github/workflows/test-deploy-fork.yml index 955233292f..af7795b453 100644 --- a/.github/workflows/test-deploy-fork.yml +++ b/.github/workflows/test-deploy-fork.yml @@ -308,3 +308,19 @@ jobs: SUCCESS: 'true' PULL_REQUEST_NUMBER: ${{ env.PR_NUMBER }} TOKEN: ${{ secrets.GITHUB_TOKEN }} + + NotifyFailure: + needs: [cypress_app_functionality,cypress_additional_v3,cypress_additional_v2,cypress_full_v3,cypress_full_v2,deploy_fork,cypress_smoke_v3,cypress_smoke_v2,next_js_analyze,prepare_jobs] + runs-on: ubuntu-latest + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' From c9603ed72171dde6505b55b2b6f9d2ce7887d3f1 Mon Sep 17 00:00:00 2001 From: marcPineiroAave <107112627+marcPineiroAave@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:29:04 +0100 Subject: [PATCH 11/12] Added notify failure to mattermost job Added job to notify a mattermost channel in case of failure --- .github/workflows/update-cache.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/update-cache.yml b/.github/workflows/update-cache.yml index c4b699d4ad..0f9d452e05 100644 --- a/.github/workflows/update-cache.yml +++ b/.github/workflows/update-cache.yml @@ -35,3 +35,19 @@ jobs: git push exit fi + + NotifyFailure: + needs: [cache-refresh] + runs-on: ubuntu-latest + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}' From 7f61a3efe634e7dfcd300c01b0a41b7767b425a5 Mon Sep 17 00:00:00 2001 From: marcPineiroAave <107112627+marcPineiroAave@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:31:21 +0100 Subject: [PATCH 12/12] Added notify failure to mattermost job Added job to notify a mattermost channel in case of failure --- .github/workflows/update-prod-staging.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/update-prod-staging.yml b/.github/workflows/update-prod-staging.yml index 5c74a7fd5b..35f2329050 100644 --- a/.github/workflows/update-prod-staging.yml +++ b/.github/workflows/update-prod-staging.yml @@ -104,3 +104,19 @@ jobs: CF_ZONE_ID: '${{ secrets.CF_ZONE_ID }}' HASH: '${{ steps.pinata.outputs.hash }}' CF_DEPLOYMENT_DOMAIN: staging.aave.com + + NotifyFailure: + needs: [staging,production] + runs-on: ubuntu-latest + if: ${{ failure() }} + steps: + - id: text + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "out=${{ github.workflow }}:\t<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>\\n $(gh api /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq -c '.jobs | .[] | select( .conclusion | contains("failure"))' | jq -r '"- <\(.html_url)|\(.name)>\\n"' | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Webhook + uses: joelwmale/webhook-action@master + with: + url: ${{ secrets.WEBHOOK_URL }} + body: '{"text": "${{ steps.text.outputs.out }}"}'