Any non-zero exit code at the end of your Execute Windows batch command build step will result in build step being marked as failure
.
To have the build step marked as success
, you need an exit code of 0
. I don't know anything about "yslow" or "phantomjs" and why they are giving you exit code of non-zero, but from "batch" side of things, you need only write exit 0
at the end of your build step if you want to overwrite the exit code of your phantomjs
command.
You can then use Text Finder plugin to parse the console log and mark build as unstable
when certain conditions are met.
Reading over this answer, Configuring yslow on Jenkins looks like you need TAP plugin to have the functionality of unit testing marking the build as unstable automatically