Jenkins Pipeline Fails if Step is Unstable
<p>Currently my pipeline fails (red), when a maven-job is unstable (yellow).</p>

<pre><code>node {
    stage 'Unit/SQL-Tests'
    parallel (
       phase1: { build 'Unit-Tests' }, // maven
       phase2: { build 'SQL-Tests' } // shell
    )
    stage 'Integration-Tests'
    build 'Integration-Tests' // maven
}
</code></pre>

<p>In this example the job Unit-Test's result is unstable, but is shown as failed in the pipeline.</p>

<p>How can I change the jobs/pipeline/jenkins to have the (1) the pipeline step unstable instead of failed and (2) the pipeline's status unstable instead of failed.</p>

<p>I tried adding the <code>MAVEN_OPTS</code> parameter <code>-Dmaven.test.failure.ignore=true</code>, but that did not solve the issue. I am unsure how to wrap the <code>build 'Unit-Test'</code> into some logic that can catch and process the result.</p>

<p>Adding a sub-pipeline with <a href="https://support.cloudbees.com/hc/en-us/articles/218866667-How-to-abort-a-Pipeline-build-if-JUnit-tests-fail" rel="noreferrer">this logic</a> doesn't do the trick, as there is no option to checkout from subversion (that option is available in a regular maven job). I would not like to use commandline checkout if possible. </p>