CircleCIとSlackの連携

連携方法はOrbs v4。Webhookとかって書いてある情報は前のバージョンなので無視。

[CircleCI側]

Project Settings → Environment Variables

SLACK_ACCESS_TOKENとSLACK_DEFAULT_CHANNELを設定

SLACK_DEFAULT_CHANNELは、ブラウザ版Slackでアクセスした時のURLでチャンネルIDを確認して登録。

https://app.slack.com/client//

という形式になっている。

[Slack側]

管理ユーザーで下記にアクセス

https://api.slack.com/apps

自分で create app したアプリ(CircleCI)を選択。

サイドバーのOAuth & Permissions

User OAuth TokenとBot User OAuth Tokenがある。
Slack通知をどちらにさせたいかで、CircleCIのSLACK_ACCESS_TOKENに入れるトークンを変える。

You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

コメントを残す

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

CAPTCHA