チャットツールはやっぱりSlackいいなぁ〜
お金が許すならwebhockが豊富なSlackで行きたいもんです
前提条件
- TravisCIのアカウントを作成
- Slackのアカウント作成
- .travis.ymlを作成してTravisCIでCIが行えている
Slackでの操作
- SlackのIntegrationsからTravis CIを検索
- Post to ChannelでChannelを選択し、Addで追加

travisコマンドのインストール
$ gem install travis
travisコマンド操作
travis login
$ travis login
# githubのユーザ名、パスワードを入力
同期
$ travis sync
Tokenを設定
- Slackの設定ページ
Browse Apps > Travis CI > Edit configuration
-
Setup Instructions
expandで設定項目が表示される -
Encrypting your credentials
のコマンドを入力

※ 上記をコピペするだけでは、Github上のレポジトリが設定されていないので-r owner/repos
を指定する必要がある
travis encrypt -r owner/repos "domain:token" --add notifications.slack
Githubへpushしてみる
push後Slackへ下記のように通知が来ていればOK
