-
Notifications
You must be signed in to change notification settings - Fork 34
Support for Capistrano deploy annotations #41
Comments
Good idea, we'll take a look at adding this. |
Any progress? |
I made something like this for myself and put this in namespace :librato do
task :deploy => :environment do
sha, msg = `git show --pretty="%h:%s"`.strip.split(":", 2)
Librato::Rails.client.annotate :deployments, "Deployed #{sha}",
:description => msg,
:source => Librato::Rails.source,
:links => [
{:rel => "github", :href => "http://github.com/user/repo/commit/#{sha}"}
]
end
end |
Awesome, thanks! I'd like to implement a stand-alone cap plugin so people don't have to be married to any of our specific libs for easy annotation support but this is an awesome example of how to get it up quick now. Thanks very much for taking the time to share this. |
Do not bother with cap, it is too specific and too simple. Simple rake task will do. after :"deploy:symlink", :"librato:deploy";
namespace :librato do
desc "Annotate librato deploy"
task :deploy do
run "cd #{release_path}; RAILS_ENV=#{rails_env} bundle exec rake librato:deploy"
end
end |
I've written a 'standalone' gem you might be interested in: https://github.com/Jimdo/librato-rake-deploytrack |
@Nesquick Awesome, I'll add reference to that in the README. |
Added here: https://github.com/librato/librato-rails#tracking-deploys Going to go ahead and close this since both this ticket and the gem are now referenced in the README. |
❤️ On Wednesday, July 30, 2014, Matt Sanders notifications@github.com wrote:
|
Would be great if you provided Capistrano hooks to automatically annotate our metrics on deploy (tagged with Git commit id, who deployed, which branch and which stage)
The text was updated successfully, but these errors were encountered: