Project

capslack

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Send notification to slack about your Rails Capistrano deployment.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0
 Project Readme

Capslack

Send notification message to your Slack channel about your Rails Capistrano deployment via Slack webhook.

Installation

Add this line to your application's Gemfile:

gem 'capslack'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capslack

Usage

Add this line to your Capfile:

require 'capslack', require: false

Setup in config/deploy.rb. Example:

set :slack_config, {
  web_hook: 'https://hooks.slack.com/services/mMg3G3EHP/FqgP4hUR3/uvkJbkYCXm9ALVn7UT3M6u',
  app_name: 'APP_NAME',
  channel: 'SLACK_CHANNEL_NAME'
}

before 'deploy:updating', 'slack:notify:starting_to_deploy' do
  Rake::Task['slack:notify'].invoke('Starting to deploy', false)
end

after 'deploy:finishing', 'slack:notify:deployment_finished' do
  Rake::Task['slack:notify'].invoke('Deployment finished', true)
end

after 'sidekiq:stop', 'slack:notify:sidekiq_stop' do
  Rake::Task['slack:notify'].invoke('Sidekiq stopped', false)
end

after 'sidekiq:start', 'slack:notify:sidekiq_start' do
  Rake::Task['slack:notify'].invoke('Sidekiq started', false)
end

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/flanker/capslack.

License

The gem is available as open source under the terms of the MIT License.