I created a simple job in Jenkins executing a short sequence of basic batch commands in Windows intentionally with an error to induce a failed build. The log registered the error (as expected) but finished with status: ‘Success’ (not as expected!).
Shouldn’t this job end with status: ‘Failed’?
A similar job with an intentional error ends on Debian as ‘Failed’ in Jenkins (as expected). That’s why I expected the job on Windows to fail alike.
You didn’t provide the “simple job” in which the error is.
It’s most likely that you are running multiple commands and ignoring the failures, and then return successfully from the cmd at the end of your script - which obviously counts as a success.
You are right @JanneK, the script doesn’t abort after encountering the unrecognized ‘xxxx’ line but is going on until the end of the script and returns with status ‘Success’. On Linux an unrecognized command aborts the script. That’s the difference.