LoginSignup
51

More than 5 years have passed since last update.

CircleCIの結果をSlackに通知する

Last updated at Posted at 2016-08-14

circle.ymlの準備

circle.ymlファイルを作って、プロジェクトRoot直下に置く。

CircleCI側の準備

GitHubアカウントがあればSign upできる。
https://circleci.com/

プロジェクトを追加

[Add Projects] からCIしたいリポジトリ選んでビルド!
https://circleci.com/add-projects

これで以降pushを契機にCIが走るようになる。

Slack側の設定

Slack側の設定

integrationにCircleCIを追加する
https://my.slack.com/apps
https://my.slack.com/apps/A0F7VRE7N-circle-ci

  1. [Add Configuration]
  2. 通知したいチャンネルを選んで、Webhook URLを控える
  3. アイコンは任意だけど僕はテンション上がるので変える
  4. [Save Integration]

CircleCI側の設定

  1. 通知したいプロジェクトを選ぶ
  2. [project settings]→[Chat Notifications]
  3. SlackのWebhook URLをSaveしたらそれで完了
  4. 「Hello from CircleCI 」みたいな感じで、最初の通知が来ているか確認する

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
51