title: Jenkins treats any non-zero exit code as error
body: <p>This is a concern as we have an executable which returns 2 as warning. We do not want to fail the Jenkins build pipeline just because of this. How can we modify the pipeline to accept an exit code 2, and prints out a reasonable warning message based on the exit code?</p>
  <pre><code>D:\Stage&gt;c:\bin\mycommand
  script returned exit code 2
  </code></pre>