 <p>Any non-zero exit code at the <em>end</em> of your <strong>Execute Windows batch command</strong> build step will result in build step being marked as <code>failure</code>.</p> <p>To have the build step marked as <code>success</code>, you need an exit code of <code>0</code>. 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 <code>exit 0</code> at the end of your build step if you want to overwrite the exit code of your <code>phantomjs</code> command.</p> <p>You can then use <strong><a href="https://wiki.jenkins-ci.org/display/JENKINS/Text-finder+Plugin" rel="nofollow">Text Finder plugin</a></strong> to parse the console log and mark build as <code>unstable</code> when certain conditions are met.</p> <p>Reading over this answer, <strong><a href="http://stackoverflow.com/questions/11419284/configuring-yslow-on-jenkins">Configuring yslow on Jenkins</a></strong> looks like you need <a href="https://wiki.jenkins-ci.org/display/JENKINS/TAP+Plugin" rel="nofollow"><strong>TAP plugin</strong></a> to have the functionality of unit testing marking the build as unstable automatically</p>