Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.17 KB

README.md

File metadata and controls

47 lines (32 loc) · 1.17 KB

Capistrano Notifier Build Status

Install

In your Gemfile:

gem 'capistrano-notifier'

and then bundle install

Mail

Configure

require 'capistrano/notifier/mail'

set :notifier_mail_options, {
  :method => :test, # :smtp, :sendmail, or any other valid ActionMailer delivery method
  :from   => 'capistrano@domain.com',
  :to     => ['john@doe.com', 'jane@doe.com'],
  :github => 'MyCompany/project-name'
}

namespace :deploy do
  desc "Capistrano Notifier"
  task :notify do
    Capistrano::Notifier.new(self).perform
  end
end

after 'deploy', 'deploy:notify'

Test

cap deploy:notify

StatsD

To notify StatsD, require 'capistrano/notifier/statsd' in your deploy.rb. When deploying it will look for a config/stats.yml and load the host and port from there. It should use the stages if you're using multistage.

A counter of 1 will be sent with the key application.stage.deploy if using multistage or application.deploy if not. Netcat must be installed on the remote machine.