LoginSignup
12
14

More than 5 years have passed since last update.

SlackでTravisCIからの通知を受け取る

Last updated at Posted at 2015-12-13

チャットツールはやっぱりSlackいいなぁ〜
お金が許すならwebhockが豊富なSlackで行きたいもんです

前提条件

  • TravisCIのアカウントを作成
  • Slackのアカウント作成
  • .travis.ymlを作成してTravisCIでCIが行えている

Slackでの操作

  1. SlackのIntegrationsからTravis CIを検索
  2. Post to ChannelでChannelを選択し、Addで追加

slack_setting.png

travisコマンドのインストール

$ gem install travis

travisコマンド操作

travis login

$ travis login
# githubのユーザ名、パスワードを入力

同期

$ travis sync

Tokenを設定

  1. Slackの設定ページ Browse Apps > Travis CI > Edit configuration
  2. Setup Instructions expandで設定項目が表示される
  3. Encrypting your credentialsのコマンドを入力

slack_travis_cmd.png

※ 上記をコピペするだけでは、Github上のレポジトリが設定されていないので-r owner/reposを指定する必要がある

travis encrypt -r owner/repos "domain:token" --add notifications.slack

Githubへpushしてみる

push後Slackへ下記のように通知が来ていればOK

スクリーンショット 2015-12-13 16.40.19.png

12
14
0

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
12
14