rollback is only called if there is a failure within a transaction. take a
look in the cap source deploy.rb, around the :update task.

I couldn't find a reliable way to hook up a negative deploy notification.

I think you would have to wrap everything in a transaction so that you could
catch any abnormal exits.


On Tue, Sep 6, 2011 at 9:59 AM, Matt <[email protected]> wrote:

> Hi everyone,
>
> I'm using the rad capistrano-campfire gem to write updates to the chatroom
> when deploys start and succeed, as deploys are kicked off from campfire a-la
> github. However, I can't seem to identify,in the deploy.rb file itself, when
> a deploy failed. I thought if I put a trigger after rollback, then that
> would catch it, e.g.
>
>   desc "Announce the failed deploy to the chat room"
>   task 'announce_fail' do
>     campfire.speak "Deploy of #{branch} #{stage} FAILED. OH NOES!"
>   end
>
> after  'deploy:rollback', 'foo:announce_fail'
>
> however, it doesn't look like deploy:rollback is what is called when stuff
> is rolled-back. Is there a global rollback task I can hook into, or some
> other way to detect when a deploy fails? I'd like to do it within cap and
> not outside...
>
> Thanks,
>
> --
> Matt
>
> --
> * You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/capistrano?hl=en

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to