Skip to content

leejones/capistrano-notify

Repository files navigation

CapistranoNotify

CapistranoNotify notifies you via system notifications when your deployment is finished. But wait, there's more!

Your deploy is now diamonds

Usage

Install growl and growlnotify.

Install capistrano-notify:

gem install capistrano-notify

Require capitrano-notify in your deploy.rb:

require 'capistrano/notify'

Default notifications

after :deploy - "#{application} was successfully deployed to #{deploy_stage}"
after "deploy:setup" - "#{application} was successfully prepared for deployment on #{deploy_stage}"
on :rollback - "There was a problem with your deploy to #{application} #{deploy_stage}"
# you are using moonshine aren't you? :)
before "moonshine:apply" - "Moonshine is applying the #{fetch(:moonshine_manifest)} for #{fetch(:application)}."

Options

:notify_deploy_message - sets the message for when a deployment is complete.

set :notify_deploy_message, "Your deploy is now diamonds."

:notify_rollback_message - sets the message for when a deploy fails and roll back (default: app name deploy failed1111)

set :notify_rollback_message, "Doh, you just drove a golf cart into the lake."

:notify_stickiness - sets wether the system notification should be sticky (default false)

set :notify_stickiness, true

:notify_enabled - sets wether capistrano-notify is enabled/disable for a project (default: true)

set :notify_enabled, false

Example of overriding a default message:

namespace :notify
  namespace :deploy
    task :success
      set :notify_stickyness, true
      set :notify_message, "Your deploy is now diamonds."
      notifynotify      
    end
  end
end

Can't get enough? Easily add capistrano-notify to all projects

You can add capistrano-notify to all your projects by adding the following to you ~/.caprc

on :load do
  require 'capistrano-notify'
end

About

System notifications from Capistrano

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages