Capistrano Integration
You can log a message to Jaconda when someone deploys with Capistrano.
Firstly, you and your coworkers need to install gem: gem
install jaconda. If it is not installed, notify task will
not be invoked, but deploying process will continue as usual.
Then add this into your deploy.rb file, replacing
<jaconda_subdomain>,
<room_id> and
<room_token> with your actual data (What
is it?):
set :jaconda_subdomain, <jaconda_subdomain>
set :jaconda_room_id, <room_id>
set :jaconda_room_token, "<room_token>"
begin
require "jaconda"
rescue LoadError
puts "Jaconda notification is not available. Install it with: gem install jaconda"
jaconda_not_installed = true
end
before "deploy:update_code", "notify:jaconda" unless jaconda_not_installed
namespace :notify do
desc 'Alert Jaconda of a deploy'
task :jaconda do
branch_name = branch.split('/', 2).last
deployer = `git config user.name`.strip
Jaconda::Notification.authenticate(:subdomain => jaconda_subdomain,
:room_id => jaconda_room_id,
:room_token => jaconda_room_token)
Jaconda::Notification.notify(:text => "<i>#{deployer} is deploying " +
"#{branch_name} to #{rails_env} " +
"with `cap #{ARGV.join(' ')}`</i>",
:sender_name => "capistrano")
end
end