From 4015f27a4d032c163411e0fa0caa3a1507769040 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 9 Mar 2020 22:31:50 -0700 Subject: Drop direct Slack notification from CIs All Slack alerts have been migrated to a bot made by mame-san --- .github/workflows/macos.yml | 20 +++----------------- .github/workflows/mingw.yml | 20 +++----------------- .github/workflows/mjit.yml | 20 +++----------------- .github/workflows/ubuntu.yml | 20 +++----------------- .github/workflows/windows.yml | 20 +++----------------- .travis.yml | 9 +-------- appveyor.yml | 23 +---------------------- 7 files changed, 17 insertions(+), 115 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9970299c54..83ee14dc58 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -53,21 +53,6 @@ jobs: # Remove minitest from TEST_BUNDLED_GEMS_ALLOW_FAILURES if https://github.com/seattlerb/minitest/pull/798 is resolved # rss needs to add workaround for the non rexml environment TEST_BUNDLED_GEMS_ALLOW_FAILURES: "minitest,xmlrpc,rss,rexml" - - uses: k0kubun/action-slack@v2.0.0 - with: - payload: | - { - "attachments": [{ - "text": "${{ github.workflow }} / ${{ matrix.test_task }} " + - "() " + - "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }} failed", - "color": "danger" - }] - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - if: failure() && github.event_name == 'push' - # New Slack notification (experimental) - uses: k0kubun/action-slack@v2.0.0 with: payload: | @@ -75,8 +60,9 @@ jobs: "ci": "GitHub Actions", "env": "${{ github.workflow }} / ${{ matrix.test_task }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}" + "commit": "${{ github.sha }}", + "branch": "${{ github.ref }}".split('/').reverse()[0] } env: - SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} + SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: failure() && github.event_name == 'push' diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 38432df7ea..a29d4c717b 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -138,21 +138,6 @@ jobs: ruby -v ruby ../mspec/bin/mspec -j - - uses: k0kubun/action-slack@v2.0.0 - with: - payload: | - { - "attachments": [{ - "text": "${{ github.workflow }} / ${{ matrix.test_task }} " + - "() " + - "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }} failed", - "color": "danger" - }] - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - if: failure() && github.event_name == 'push' - # New Slack notification (experimental) - uses: k0kubun/action-slack@v2.0.0 with: payload: | @@ -160,8 +145,9 @@ jobs: "ci": "GitHub Actions", "env": "${{ github.workflow }} / ${{ matrix.test_task }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}" + "commit": "${{ github.sha }}", + "branch": "${{ github.ref }}".split('/').reverse()[0] } env: - SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} + SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: failure() && github.event_name == 'push' diff --git a/.github/workflows/mjit.yml b/.github/workflows/mjit.yml index 0bd2f347df..4814ae1b0f 100644 --- a/.github/workflows/mjit.yml +++ b/.github/workflows/mjit.yml @@ -54,21 +54,6 @@ jobs: working-directory: build - run: make $JOBS -s test-spec working-directory: build - - uses: k0kubun/action-slack@v2.0.0 - with: - payload: | - { - "attachments": [{ - "text": "${{ github.workflow }} / ${{ matrix.test_task }} ${{ matrix.jit_opts }} " + - "() " + - "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }} failed", - "color": "danger" - }] - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - if: failure() && github.event_name == 'push' - # New Slack notification (experimental) - uses: k0kubun/action-slack@v2.0.0 with: payload: | @@ -76,8 +61,9 @@ jobs: "ci": "GitHub Actions", "env": "${{ github.workflow }} / ${{ matrix.test_task }} ${{ matrix.jit_opts }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}" + "commit": "${{ github.sha }}", + "branch": "${{ github.ref }}".split('/').reverse()[0] } env: - SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} + SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: failure() && github.event_name == 'push' diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 9b4237d967..4f50216569 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -67,21 +67,6 @@ jobs: # Remove minitest from TEST_BUNDLED_GEMS_ALLOW_FAILURES if https://github.com/seattlerb/minitest/pull/798 is resolved # rss needs to add workaround for the non rexml environment TEST_BUNDLED_GEMS_ALLOW_FAILURES: "minitest,xmlrpc,rss" - - uses: k0kubun/action-slack@v2.0.0 - with: - payload: | - { - "attachments": [{ - "text": "${{ matrix.os }} / ${{ matrix.test_task }} " + - "() " + - "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }} failed", - "color": "danger" - }] - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - if: failure() && github.event_name == 'push' - # New Slack notification (experimental) - uses: k0kubun/action-slack@v2.0.0 with: payload: | @@ -89,8 +74,9 @@ jobs: "ci": "GitHub Actions", "env": "${{ matrix.os }} / ${{ matrix.test_task }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}" + "commit": "${{ github.sha }}", + "branch": "${{ github.ref }}".split('/').reverse()[0] } env: - SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} + SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: failure() && github.event_name == 'push' diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index fdac90ca8f..f786913547 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -70,21 +70,6 @@ jobs: nmake ${{ matrix.test_task }} working-directory: build shell: cmd - - uses: k0kubun/action-slack@v2.0.0 - with: - payload: | - { - "attachments": [{ - "text": "${{ matrix.os }} / ${{ matrix.test_task }} " + - "() " + - "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }} failed", - "color": "danger" - }] - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - if: failure() && github.event_name == 'push' - # New Slack notification (experimental) - uses: k0kubun/action-slack@v2.0.0 with: payload: | @@ -92,8 +77,9 @@ jobs: "ci": "GitHub Actions", "env": "${{ matrix.os }} / ${{ matrix.test_task }}", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - "commit": "${{ github.sha }}" + "commit": "${{ github.sha }}", + "branch": "${{ github.ref }}".split('/').reverse()[0] } env: - SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} + SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: failure() && github.event_name == 'push' diff --git a/.travis.yml b/.travis.yml index 7df92bc54f..5db134a90c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -532,16 +532,9 @@ notifications: template: - "%{message} by @%{author}: See %{build_url}" - slack: - rooms: - - secure: ah7UEHBvncXT7bM5mvYIQAO+tIyV/wl7nXLb7wQD16dO2v8Gragy0mWjB79Q09hrrMGmp6H9bCDpdGS80boIA5EHaHoG4QaP0i9bsSt8U2AMWgZtfyIgQKJ4H2kXkGlrjO+AXTgnIkP7LNjdgAVUUTGQPb26T3QmoN2Splt+fIQ= # ruby:#alerts - on_pull_requests: false - on_success: never - on_failure: always - webhooks: urls: - - secure: mRsoS/UbqDkKkW5p3AEqM27d4SZnV6Gsylo3bm8T/deltQzTsGzZwrm7OIBXZv0UFZdE68XmPlyHfZFLSP2V9QZ7apXMf9/vw0GtcSe1gchtnjpAPF6lYBn7nMCbVPPx9cS0dwL927fjdRM1vj7IKZ2bk4F0lAJ25R25S6teqdk= # simpler alerts (travis) + - secure: mRsoS/UbqDkKkW5p3AEqM27d4SZnV6Gsylo3bm8T/deltQzTsGzZwrm7OIBXZv0UFZdE68XmPlyHfZFLSP2V9QZ7apXMf9/vw0GtcSe1gchtnjpAPF6lYBn7nMCbVPPx9cS0dwL927fjdRM1vj7IKZ2bk4F0lAJ25R25S6teqdk= # ruby-lang slack: ruby/simpler-alerts-bot (travis) on_pull_requests: false on_success: never on_failure: always diff --git a/appveyor.yml b/appveyor.yml index 711c52693b..2acfff27ed 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -72,31 +72,10 @@ for: - nmake -l "TESTOPTS=-v --timeout-scale=3.0 --excludes=../test/excludes/_appveyor" test-all TESTS="../test/win32ole ../test/ruby/test_bignum.rb ../test/ruby/test_syntax.rb ../test/open-uri/test_open-uri.rb ../test/rubygems/test_bundled_ca.rb" - nmake -l test-spec MSPECOPT=-fs # not using `-j` because sometimes `mspec -j` silently dies on Windows notifications: - # Using "Webhook" with templated body to skip notification on Pull Request - provider: Webhook method: POST url: - secure: iMINHMS0nZabaDsxN9omRDsekxzVvAAzEq5ev7lN6vb+gUETT+rbDKLGxBxBpEpxlnPlLdzroIJ+DTKlwfJA8VkGawTn9EXNsucH0OkSf2M= # AppVeyor CI - body: >- - {{^isPullRequest}} - { - "attachments": [ - { - "text": "Build <{{buildUrl}}|#{{buildVersion}}> (<{{commitUrl}}|{{commitId}}>) of {{repositoryName}}@{{branch}} by {{commitAuthor}} {{status}}", - "color": "{{#passed}}good{{/passed}}{{#failed}}danger{{/failed}}" - } - ], - "channel": "#alerts" - } - {{/isPullRequest}} - on_build_success: false - on_build_failure: true - on_build_status_changed: false - # New Slack notification (experimental) - - provider: Webhook - method: POST - url: - secure: CcFlJNDJ/a6to7u3Z4Fnz6dScEPNx7hTha2GkSRlV+1U6dqmxY/7uBcLXYb9gR3jfQk6w+2o/HrjNAyXMNGU/JOka3s2WRI4VKitzM+lQ08owvJIh0R7LxrGH0J2e81U # simpler alerts + secure: CcFlJNDJ/a6to7u3Z4Fnz6dScEPNx7hTha2GkSRlV+1U6dqmxY/7uBcLXYb9gR3jfQk6w+2o/HrjNAyXMNGU/JOka3s2WRI4VKitzM+lQ08owvJIh0R7LxrGH0J2e81U # ruby-lang slack: ruby/simpler-alerts-bot body: >- {{^isPullRequest}} { -- cgit v1.2.3