Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Simple notification hooks for Capistrano
Ruby

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/capistrano
spec
.gitignore
.rspec
.rvmrc
.travis.yml
Gemfile
Guardfile
LICENSE
README.md
Rakefile
capistrano-notifier.gemspec

README.md

Capistrano Notifier Build Status

Install

In your Gemfile:

gem 'capistrano-notifier'

and then bundle install

cap needs to be invoked with Bundler for the require statements below to work properly. You can do so with either bundle exec cap, or with bundle install --binstubs and making sure bin is high up in your $PATH.`

Mail

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'
}

If you specified :method => test, you can see the email that would be generated in your console with cap deploy:notify:mail.

StatsD

require 'capistrano/notifier/statsd'

A counter of 1 will be sent with the key application.stage.deploy if using multistage, or application.deploy if not. To use a gauge instead of a counter, use :with => :gauge:

set :notifier_statsd_options, {
  :with => :gauge
}

If you want to specify a host:port other than 127.0.0.1:8125, you can do so like this:

set :notifier_statsd_options, {
  :host => "10.0.0.1",
  :port => "8125"
}

The nc (Netcat) command is used to send messages to statsd and must be installed on the remote hosts. This is installed by default on most Unix machines.

Something went wrong with that request. Please try again.