GithubHelp home page GithubHelp logo

namedpipe / capistrano-notifier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gofullstack/capistrano-notifier

0.0 2.0 0.0 167 KB

Simple notification hooks for Capistrano

License: MIT License

Ruby 100.00%

capistrano-notifier's Introduction

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   => '[email protected]',
  :to     => ['[email protected]', '[email protected]'],
  :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.

If you specified :method => :smtp, you can specify :smtp_settings

For example:

set :notifier_mail_options, {
  :method => :smtp,
  :from   => '[email protected]',
  :to     => ['[email protected]', '[email protected]'],
  :github => 'MyCompany/project-name',
  :smtp_settings => {
    address: "smtp.gmail.com",
    port: 587,
    domain: "gmail.com",
    authentication: "plain",
    enable_starttls_auto: true,
    user_name: MY_USERNAME,
    password: MY_PASSWORD
  }
}

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.

capistrano-notifier's People

Contributors

bcobb avatar justincampbell avatar liuggio avatar smith avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.