[capistrano] How to cancel/abort current deployment in a task?

2,443 views
Skip to first unread message

Jean-Philippe Doyle

unread,
Apr 20, 2010, 11:17:04 PM4/20/10
to Capistrano
Hello

Anyone can help on how to abort deployment in a task of my recipe?

I run a sh script of my unit tests and if I got any sterr output I
would like to cancel deployment.

http://gist.github.com/373366

Thank you

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

Lee Hambley

unread,
Apr 21, 2010, 4:19:00 AM4/21/10
to capis...@googlegroups.com
If your script exists posix status 1 (read: failure) then your recipe should stop, and rollback.

- Lee

Jean-Philippe Doyle

unread,
May 22, 2010, 5:08:44 PM5/22/10
to Capistrano
You can manually raise a rollback this way :

error = CommandError.new("An error that should abort and rollback
deployment")
raise error

Exemple code : http://gist.github.com/410363

On 21 avr, 04:19, Lee Hambley <lee.hamb...@gmail.com> wrote:
> If your script exists posix status 1 (read: failure) then your recipe should
> stop, and rollback.
>
> - Lee
>
> On 21 April 2010 05:17, Jean-Philippe Doyle <jeanphilippe.do...@gmail.com>wrote:
>
>
>
> > Hello
>
> > Anyone can help on how to abort deployment in a task of my recipe?
>
> > I run a sh script of my unit tests and if I got any sterr output I
> > would like to cancel deployment.
>
> >http://gist.github.com/373366
>
> > Thank you
>
> > --
> > * You received this message because you are subscribed to the Google Groups
> > "Capistrano" group.
> > * To post to this group, send email to capis...@googlegroups.com
> > * To unsubscribe from this group, send email to
> > capistrano+...@googlegroups.com<capistrano%2Bunsu...@googlegroups.com>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 capis...@googlegroups.com
> * To unsubscribe from this group, send email to capistrano+...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/capistrano?hl=en
Reply all
Reply to author
Forward
0 new messages