fail logic #2655
Unanswered
mexoboy
asked this question in
Help needed
fail logic
#2655
Replies: 1 comment
-
Put in this way:
Your rollback task must include unlock and everything else you need. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone.
I want to integrate smoke tests after deploy. For that I make custom task and add it after deploy:symlink. If any test failed, release must do rollback. I have recipe something like this:
`
task('deploy', [
...
'deploy:symlink',
'deploy:test',
'deploy:unlock',
'cleanup',
]);
after('deploy', 'success');
after('deploy:failed', 'deploy:unlock');
fail('deploy:test', 'rollback');
`
The problem: When some test failed, inside task "deploy:test" my code throwing Deployer\Exception\Exception. I expected, than after failure triggered task "rollback". But it doesn't happen.
Anyone can explain me what I do wrong? Thanks for answers and advices.
Beta Was this translation helpful? Give feedback.
All reactions