Skip to content

MarcoMatarazzo/capistrano-slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Capistrano 3 Slack Integration

Credits

Based on

Installation

Add it to your Gemfile:

gem 'capistrano-slack', github: 'MarcoMatarazzo/capistrano-slack'

Configuration

Add to your Capfile:

require 'slack-notifier'
require 'capistrano-slack'

Add to your deploy.rb:

set :slack_url, 'https://hooks.slack.com/services/XXX/XXX/XXX'
set :slack_channel, '#capistrano_channel'
set :slack_username, 'Capistrano'
set :slack_icon, 'https://somewhere.com/icon.png'
set :slack_user, `git config --get user.name`.chomp
set :slack_client, Slack::Notifier.new(
  fetch(:slack_url),
  channel: fetch(:slack_channel),
  username: fetch(:slack_username),
  icon_url: fetch(:slack_icon)
)
### CHECKING...
#before 'deploy', 'slack:starting'
#after  'deploy', 'slack:finished'
#before 'deploy:rollback', 'slack:failed'
#after 'deploy:rollback', 'slack:rolled_back'

About

Capistrano Slack Integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages