From 57d60cdd346754b6907375779dd31a9ec2068c36 Mon Sep 17 00:00:00 2001 From: Tom Frenken Date: Mon, 29 Apr 2024 08:59:20 +0200 Subject: [PATCH 1/3] add slack notificaitons --- .github/workflows/blackduck.yml | 12 ++++++++++++ .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ .github/workflows/fosstars-report.yml | 12 ++++++++++++ .github/workflows/memory-tests.yml | 12 ++++++++++++ 4 files changed, 62 insertions(+) diff --git a/.github/workflows/blackduck.yml b/.github/workflows/blackduck.yml index 1780506e45..b493ecd635 100644 --- a/.github/workflows/blackduck.yml +++ b/.github/workflows/blackduck.yml @@ -32,3 +32,15 @@ jobs: DETECT_TIMEOUT: 6000 DETECT_YARN_EXCLUDED_WORKSPACES: test-packages/** DETECT_YARN_DEPENDENCY_TYPES_EXCLUDED: NON_PRODUCTION + - if: failure() || cancelled() + name: Slack Notify + uses: rtCamp/action-slack-notify@v2.2.1 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_USERNAME: SDK Pipeline Bot + SLACK_TITLE: Blackduck scan ${{ job.status }} + SLACK_MESSAGE: ' ' + MSG_MINIMAL: event,actions url + SLACK_COLOR: ${{ job.status }} + SLACK_MSG_AUTHOR: ' ' + SLACK_ICON: https://sap.github.io/cloud-sdk/img/logo.png diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1aee0cb5a4..0ff62e88e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,6 +48,19 @@ jobs: - run: yarn test:self - run: yarn test:build-packages - run: yarn test:type + - if: ${{ github.event_name != 'pull_request' && (failure() || cancelled()) }} + name: Slack Notify + uses: rtCamp/action-slack-notify@v2.2.1 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_USERNAME: SDK Pipeline Bot + SLACK_TITLE: Build Tests ${{ job.status }} (${{ matrix.version }}) + SLACK_MESSAGE: ' ' + MSG_MINIMAL: event,actions url + SLACK_COLOR: ${{ job.status }} + SLACK_MSG_AUTHOR: ' ' + SLACK_ICON: https://sap.github.io/cloud-sdk/img/logo.png + checks: if: inputs.canary-release == false runs-on: ubuntu-latest @@ -77,6 +90,19 @@ jobs: name: API Doc Check - run: yarn check:license name: License Check + - if: ${{ github.event_name != 'pull_request' && (failure() || cancelled()) }} + name: Slack Notify + uses: rtCamp/action-slack-notify@v2.2.1 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_USERNAME: SDK Pipeline Bot + SLACK_TITLE: Build checks ${{ job.status }} (${{ matrix.version }}) + SLACK_MESSAGE: ' ' + MSG_MINIMAL: event,actions url + SLACK_COLOR: ${{ job.status }} + SLACK_MSG_AUTHOR: ' ' + SLACK_ICON: https://sap.github.io/cloud-sdk/img/logo.png + e2e-tests: if: inputs.canary-release == false runs-on: ubuntu-latest diff --git a/.github/workflows/fosstars-report.yml b/.github/workflows/fosstars-report.yml index 705774f7fa..dfd8fd99d8 100644 --- a/.github/workflows/fosstars-report.yml +++ b/.github/workflows/fosstars-report.yml @@ -14,3 +14,15 @@ jobs: with: report-branch: fosstars-report token: '${{ secrets.GH_CLOUD_SDK_JS_ADMIN_WRITE_TOKEN }}' + - if: failure() || cancelled() + name: Slack Notify + uses: rtCamp/action-slack-notify@v2.2.1 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_USERNAME: SDK Pipeline Bot + SLACK_TITLE: Fosstars scan ${{ job.status }} + SLACK_MESSAGE: ' ' + MSG_MINIMAL: event,actions url + SLACK_COLOR: ${{ job.status }} + SLACK_MSG_AUTHOR: ' ' + SLACK_ICON: https://sap.github.io/cloud-sdk/img/logo.png diff --git a/.github/workflows/memory-tests.yml b/.github/workflows/memory-tests.yml index d5d1fda179..7704aee3b7 100644 --- a/.github/workflows/memory-tests.yml +++ b/.github/workflows/memory-tests.yml @@ -36,3 +36,15 @@ jobs: working-directory: test-packages/memory-tests/sdk-canary/ - run: yarn ts-node scripts/compare-memory-usage.ts $(cat ./test-packages/memory-tests/sdk-v2/result.txt) $(cat ./test-packages/memory-tests/sdk-canary/result.txt) name: compare v2 and canary + - if: failure() || cancelled() + name: Slack Notify + uses: rtCamp/action-slack-notify@v2.2.1 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_USERNAME: SDK Pipeline Bot + SLACK_TITLE: Memory tests ${{ job.status }} + SLACK_MESSAGE: ' ' + MSG_MINIMAL: event,actions url + SLACK_COLOR: ${{ job.status }} + SLACK_MSG_AUTHOR: ' ' + SLACK_ICON: https://sap.github.io/cloud-sdk/img/logo.png \ No newline at end of file From 3966b15f162b19866afd978509ab276758521f52 Mon Sep 17 00:00:00 2001 From: Tom Frenken Date: Mon, 29 Apr 2024 09:13:33 +0200 Subject: [PATCH 2/3] add new line --- .github/workflows/memory-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/memory-tests.yml b/.github/workflows/memory-tests.yml index 7704aee3b7..751c13a61d 100644 --- a/.github/workflows/memory-tests.yml +++ b/.github/workflows/memory-tests.yml @@ -47,4 +47,4 @@ jobs: MSG_MINIMAL: event,actions url SLACK_COLOR: ${{ job.status }} SLACK_MSG_AUTHOR: ' ' - SLACK_ICON: https://sap.github.io/cloud-sdk/img/logo.png \ No newline at end of file + SLACK_ICON: https://sap.github.io/cloud-sdk/img/logo.png From 40f92566d9aefdca5929aa254cb464691ebe23dd Mon Sep 17 00:00:00 2001 From: Tom Frenken Date: Mon, 29 Apr 2024 09:21:06 +0200 Subject: [PATCH 3/3] casing convention --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ff62e88e6..c30d392785 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} SLACK_USERNAME: SDK Pipeline Bot - SLACK_TITLE: Build Tests ${{ job.status }} (${{ matrix.version }}) + SLACK_TITLE: Build tests ${{ job.status }} (${{ matrix.version }}) SLACK_MESSAGE: ' ' MSG_MINIMAL: event,actions url SLACK_COLOR: ${{ job.status }}