How to make jenkins fail at a failing windows batch command? How to make jenkins fail at a failing windows batch command? jenkins jenkins

How to make jenkins fail at a failing windows batch command?


Sadly in batch you cannot activate a flag like the -e in bash that would exit on any return code that is not 0. However you could use a logical or to jump to an exit label as described here: https://stackoverflow.com/a/8965092/2003420


String your commands together with the batch && operator. It skips the commands to the right if the command to the left has a non-zero exit code.