ruby-changes:55065
From: k0kubun <ko1@a...>
Date: Sat, 16 Mar 2019 13:11:58 +0900 (JST)
Subject: [ruby-changes:55065] k0kubun:r67272 (trunk): Notify AppVeyor results to multiple channels
k0kubun 2019-03-16 13:11:54 +0900 (Sat, 16 Mar 2019) New Revision: 67272 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67272 Log: Notify AppVeyor results to multiple channels and simplified config by using dedicated webhook URL. Sadly AppVeyor YAML does not support alias and so we need to copy-paste the request body. memo: https://slack-files2.s3-us-west-2.amazonaws.com/bot_icons/2018-02-10/314363543719_48.png is the URL used by `provider: Slack` Modified files: trunk/appveyor.yml Index: appveyor.yml =================================================================== --- appveyor.yml (revision 67271) +++ appveyor.yml (revision 67272) @@ -17,36 +17,6 @@ environment: https://github.com/ruby/ruby/blob/trunk/appveyor.yml#L17 vs: 140 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 GEMS_FOR_TEST: "timezone tzinfo" -notifications: - - provider: Webhook - url: - secure: iMINHMS0nZabaDsxN9omRDsekxzVvAAzEq5ev7lN6vZ6r9zNhl3/F/7POIVyahAwVFpRDeQT/iUugpAGWmOt3eGL/lZIdqiJFZ9DjPSkP68= # #alerts - method: POST - # "icon_url" is the url used by `provider: Slack` - body: >- - {{^isPullRequest}} - { - "attachments": [ - { - "title": "Build {{projectName}} {{buildVersion}} {{status}}", - "fallback": "AppVeyor Build {{projectName}} {{buildVersion}} {{status}}", - "title_link": "{{buildUrl}}", - "text": "Commit <{{commitUrl}}|{{commitId}}> by {{commitAuthor}} on {{commitDate}}: _{{commitMessage}}_", - {{#passed}} - "color": "#44ee44" - {{/passed}} - {{#failed}} - "color": "#ee4444" - {{/failed}} - } - ], - "icon_url": "https://slack-files2.s3-us-west-2.amazonaws.com/bot_icons/2018-02-10/314363543719_48.png", - "username": "AppVeyor CI" - } - {{/isPullRequest}} - on_build_success: false - on_build_failure: true - on_build_status_changed: true for: - matrix: @@ -143,3 +113,49 @@ for: https://github.com/ruby/ruby/blob/trunk/appveyor.yml#L113 # separately execute tests without -j which may crash worker with -j. - mingw32-make test-all TESTOPTS="--retry --job-status=normal --show-skip --subprocess-timeout-scale=1.5 --excludes=../ruby/test/excludes/_appveyor" TESTS="../ruby/test/win32ole ../ruby/test/open-uri/test_open-uri.rb" - mingw32-make 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": [ + { + "title": "Build {{projectName}} {{buildVersion}} {{status}}", + "title_link": "{{buildUrl}}", + "fallback": "AppVeyor Build {{projectName}} {{buildVersion}} {{status}}", + "color": "{{#passed}}#44ee44{{/passed}}{{#failed}}#ee4444{{/failed}}", + "text": "Commit <{{commitUrl}}|{{commitId}}> by {{commitAuthor}} on {{commitDate}}: _{{commitMessage}}_", + } + ], + "channel": "#alerts" + } + {{/isPullRequest}} + on_build_success: false + on_build_failure: true + on_build_status_changed: true + - provider: Webhook + method: POST + url: + secure: iMINHMS0nZabaDsxN9omRDsekxzVvAAzEq5ev7lN6vb+gUETT+rbDKLGxBxBpEpxlnPlLdzroIJ+DTKlwfJA8VkGawTn9EXNsucH0OkSf2M= # AppVeyor CI + body: >- + {{^isPullRequest}} + { + "attachments": [ + { + "title": "Build {{projectName}} {{buildVersion}} {{status}}", + "title_link": "{{buildUrl}}", + "fallback": "AppVeyor Build {{projectName}} {{buildVersion}} {{status}}", + "color": "{{#passed}}#44ee44{{/passed}}{{#failed}}#ee4444{{/failed}}", + "text": "Commit <{{commitUrl}}|{{commitId}}> by {{commitAuthor}} on {{commitDate}}: _{{commitMessage}}_", + } + ], + "channel": "#commits" + } + {{/isPullRequest}} + on_build_success: false + on_build_failure: true + on_build_status_changed: true -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/