LoginSignup
14
16

More than 5 years have passed since last update.

Hubotを導入してSlackで使えるようにする

Last updated at Posted at 2014-09-18

gamba!開発チームではhubotを使って本番環境へのデプロイなどしています。

Heroku上で動かしており、導入した時の手順をご紹介します。

まず、ローカルの開発環境にhubutをいれてプロジェクトを作成します。

$ npm install -g hubot coffee-script
$ hubot --create hubot
$ cd hubot
$ echo "web: bin/hubot --adapter slack" > Procfile
$ git add .
$ git commit -am'First commit'

Herokuに環境を構築します。

$ heroku create gamba-hubot
$ heroku addons:add redistogo:nano

Slackの[Configure Integrations]メニューからHubotを追加します。追加するとトークンが発行されるのでそのトークンを設定します。

$ heroku config:add HEROKU_URL=http://gamba-hubot.herokuapp.com
$ heroku config:add HUBOT_SLACK_TOKEN=********************
$ heroku config:add HUBOT_SLACK_BOTNAME=hubot

ここで、

  • HEROKU_URLには上記で指定したアプリ名を設定します
  • HUBOT_SLACK_TOKENはSlackで設定したトークンを設定します
  • HUBOT_SLACK_BOTNAMEにはSlack上で表示したい名前を指定します

Herokuに上にデプロイします。

$ git push heroku master

以上です。

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