10
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Travis-CI からビルド成功したらチャットワークに投げるやつ

Last updated at Posted at 2015-06-17

チャットワークのトークン取得

右上の自分のアイコンクリックしてから「動作設定」→「API発行」

環境変数の設定

右上の「Settings」→「Environment Variables」→「Add a new variable」から設定しとけばおk
あとで使う CHATWORK_TOKENCHATWORK_ROOM_ID を設定
CHATWORK_TOKEN はさっき確認したチャットワークのトークン
CHATWORK_ROOM_ID はチャットワークで部屋開いた時のURLの#!ridより後ろの数字

.travis-ci に追記

after_success:
  - 'curl -X POST -H "X-ChatWorkToken: $CHATWORK_TOKEN" --data-urlencode "body=[info][title][Travis-CI] Test Passed[/title]#$TRAVIS_BUILD_NUMBER https://magnum.travis-ci.com/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID[/info]" "https://api.chatwork.com/v1/rooms/$CHATWORK_ROOM_ID/messages"'

こんな感じで投稿される

スクリーンショット_2015-06-17_19_53_09.png

10
8
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
10
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?