Haha, no worries.

We actually elected in v3 not to do an automatic rollback, because many
people found it inconvenient to debug, and we're essentially defaulting to
deleting stuff in production.

There was many weird edge cases with assets being incorrecly removed, etc,
etc, et... nothing that was 100% our fault, but we figured just failing
clearly was a better way to handle that.

In your own code, you can rescue it, and
Rake::Task["deploy:rollback"].invoke, but it's probably wiser in this case
(and, in my cases, usually) to do a switch on the shell, decide what to do,
and then rollback.

Of course a rollback is weird, because we have to delete the folder in
order to keep the "newest release" logic working, but often if you had a
bad deploy, you need the contents of that folder to do some forensics.

For that reason, keep doing what you are doing, and consider adding a task
to copy the broken release to a safe place, before it's removed by it is
removed in the rollback flow
<http://capistranorb.com/documentation/getting-started/flow/>.

If for some reason cap is failing, but you get a zero-exit status, then let
me know specifically what's going wrong, and I'll fix that, you should be
able to rely on our exit statuses being informative.

Lee Hambley
--
http://lee.hambley.name/
+49 (0) 170 298 5667

On 22 October 2014 12:25, Rafa García <conta...@rafagarcia.net> wrote:

> Capistrano v3 (3.2.1)
>
> PD: I forgot to paste gem version
>
> 2014-10-22 12:23 GMT+02:00 Rafa García <conta...@rafagarcia.net>:
>
>> Hi Lee :D
>>
>>   I'm using Capistrano v3.
>>
>> 2014-10-22 12:20 GMT+02:00 Lee Hambley <lee.hamb...@gmail.com>:
>>
>>> Hi Rafa, (welcome back!)
>>>
>>> Which version, two or three ?
>>>
>>> Lee Hambley
>>> --
>>> http://lee.hambley.name/
>>> +49 (0) 170 298 5667
>>>
>>> On 22 October 2014 11:33, Rafa García <conta...@rafagarcia.net> wrote:
>>>
>>>> Hi,
>>>>
>>>>   I have two applications deployed with Capistrano. In the last deploy
>>>> we had a problem with one of them but rollback was not executed
>>>> automatically.
>>>>
>>>>   Deploys are done automatically with jenkins. I achieved to execute
>>>> rollback inside jenkins task capturing status code in a condition and then
>>>> executing rollback task.
>>>>
>>>>   But I'm wondering (if it's possible) how I can do a rollback
>>>> automatically if any of the deploy tasks fails from Capistrano?
>>>>
>>>> Thanks
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Capistrano" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to capistrano+unsubscr...@googlegroups.com.
>>>> To view this discussion on the web, visit
>>>> https://groups.google.com/d/msgid/capistrano/CALgP05YcH%3DVRDXYt4HF816ETs0Eb_akUBCn9%2BwmKZsVXigAu5Q%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/capistrano/CALgP05YcH%3DVRDXYt4HF816ETs0Eb_akUBCn9%2BwmKZsVXigAu5Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Capistrano" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to capistrano+unsubscr...@googlegroups.com.
>>> To view this discussion on the web, visit
>>> https://groups.google.com/d/msgid/capistrano/CAN_%2BVLXTuookt36HZ-qVf1_F%3DEdN5hwFn6aXa1AbRAvD7r%3D4sw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/capistrano/CAN_%2BVLXTuookt36HZ-qVf1_F%3DEdN5hwFn6aXa1AbRAvD7r%3D4sw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to capistrano+unsubscr...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/capistrano/CALgP05Y7sOuzO%2BLmOJLKYaYaqSGbqC0yxJfqJ3H-xfjsm-DmYQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/capistrano/CALgP05Y7sOuzO%2BLmOJLKYaYaqSGbqC0yxJfqJ3H-xfjsm-DmYQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capistrano+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/CAN_%2BVLUn_6Q99xFf9w2%3DTcBCMxm21pZqb3kegeY4XiL%3DuUVM_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to