8
4

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.

capistranoでデプロイ完了時にSlackにうまるちゃんが通知してくれる様にした

Last updated at Posted at 2017-04-03

#Capistrano デプロイ完了 通知 script
capistranoのデプロイScript内に以下を追記

deploy.rb
namespace :deploy do
  task :cleanup do
    on roles(:app) do
      execute 'curl -s -S -X POST --data-urlencode "payload={\"channel\": \"#通知したいチャンネル名\", \"username\": \"umaru\", \"icon_emoji\": \":umaru:\", \"text\": \"デプロイ完了したよ〜\" }" "Slackのウェブフック通知様APIキー" >/dev/null'
    end
  end
end
  • うまるちゃんのアイコンは手動で登録お願いします
  • cleanupタスクの実行時に完了通知で良いのかという議論が残っています
8
4
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
8
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?