Replies: 1 comment 7 replies
-
|
Vito makes sure it runs the script for you like how the OS does. The deployment script by default just runs the script, however it is also able to catch exceptions and fail the deployment if you configure your script in that way. Any exit 1 will fail the deployment so a simple way of achieving it is to put |
Beta Was this translation helpful? Give feedback.
7 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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have noticed that if there are any errors in my deploy script it still succeeds. Am I doing something wrong or is it meant to be like that? I would expect it to send me a mail if anything goes wrong, so I can fix it right away. Otherwise I could have my site in a broken state. This also makes me fearful to enable modern deployments, if it will switch to a broken deployment.
Is there some setting I cannot find or do we need to do something in our deployment scripts manually?
I also use ploi, and there it stops the deployment on error if any of the steps fail.
Here is part of a deploy log that failed.
And the status is green with the text Finished
Edit: I found this article. https://betterdev.blog/minimal-safe-bash-script-template/#fail-fast
It seems it might be a good idea to always add
set -Eeuo pipefailto the start of deploy scripts. I guess this is what ploi does automatically. Perhaps vito could do that too? If not, it might be a good idea to have it in the docs at leastBeta Was this translation helpful? Give feedback.
All reactions