You can set "set -o errexit" just under the shebang line so the script will exit (and job fail) if any of the given commands fail. Or you can write your script in format "command || exit 1" (or some other exit code) after every command you wish to make sure it has been executed successfully.
Also you can set "exit 0" on the end of your script to make sure it exits with 0 if everything succeeded. Aravind SV pointed you at a very good article, make sure to read it. -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
