Git Product home page Git Product logo

capistrano-grove's Introduction

Capistrano::Grove Build Status

Note: This documentation is for the as yet to be released version 2.0.0 of Capistrano::Grove. I expect this to be ready for release in the next few days.

Send deployment notifications to your grove.io channel via Capistrano. Never again will members of your team not be made aware of events during your deployment. Alert them to maintenance page changes, migrations and deployment events by using this gem.

Installation

Add this line to your application's Gemfile:

gem "capistrano-grove", "~> 2.0.0pre1"

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano-grove --pre

In your Capfile, add:

require 'capistrano-grove'

Getting started

Capistrano::Grove is built on Capnotify which provides a series of built-in notifications. This gem plugs into those notifications and sends them to your grove.io channel.

Once you've gone through the above installation procedure, all you need to do is set your grove_channel_token as a Capistrano variable as follows:

set :grove_channel_token, 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

With that, you'll start receiving notifications to your channel for migrations, deployment and maintenance page changes.

In addition to the above, you can configure how your messages appear:

set :grove_service_name, 'MyDeployer'
set :grove_icon_url, 'https://grove.io/static/img/webapp-logo.png'
set :grove_url, 'http://example.com'

Because Capistrano::Grove is built on Capnotify, you should refer to that documentation for further customizing the messages that are posted to your channel:

https://github.com/spikegrobstein/capnotify

You can also use the grove.notify function anywhere in your Capistrano recipes to post messages to your channel ad-hoc. For example:

grove.notify 'Greetings from Capistrano!'

Notes for those upgrading from 1.x

For users coming from the 1.x gem, 2.0 brings some changes that will break your existing recipes. Keep the following in mind and adjust accordingly:

  • the grove_channel_key capistrano variable is now called grove_channel_token. This was done to better jive with the grove.io documentation.
  • there is no longer a grove:notify task. This was replaced by the grove capistrano extension and added a notify function to it which takes a message as a parameter. (for example: grove.notify "hi there")
  • the grove_message capistrano variable has been removed. Previously, this was used to store the message to be posted to your grove.io channel after a deployment, but with the implementation of Capnotify, it's unnecessary.

Variables

The following are Capistrano variables and are used via the set function.

grove_channel_token

The channel token from the grove.io website. This is the only variable that is required to get Capistrano::Grove working.

grove_service

The name of the service, aka the handle of the user, that the notification comes from. This defaults to 'Deploybot'

This should not contain spaces as that causes the grove.io webservice some grief.

grove_icon_url

This should be a URL to an image that the service will use as its avatar in the channel.

grove_url

When clicking your notification in the grove.io notification window, this is the URL that you're taken to.

Functions

grove.notify

Capistrano::Grove comes with a single function: grove.notify for posting messages to your channel. It takes a single parameter-the message to post.

Example:

grove.notify "That was easy!"

Author

Capistrano::Grove is written by Spike Grobstein
[email protected]
http://spike.grobste.in
https://github.com/spikegrobstein

License

©2012-2013 Spike Grobstein
MIT License (see LICENSE file included in this package).

capistrano-grove's People

Contributors

spikegrobstein avatar

Stargazers

 avatar  avatar  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.