Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Capistrano plugin to post a notification to grove.io about the deploy.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 CHANGELOG
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 capistrano-grove.gemspec
README.md

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
spikegrobstein@mac.com
http://spike.grobste.in
https://github.com/spikegrobstein

License

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

Something went wrong with that request. Please try again.