diff --git a/pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ParallelTest.java b/pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ParallelTest.java index 94956e03a..4687881aa 100644 --- a/pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ParallelTest.java +++ b/pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ParallelTest.java @@ -444,4 +444,13 @@ public void parallelInput() throws Exception { j.assertLogContains("Two Continues", b); } + @Issue("JENKINS-73726") + @Test + public void parallelErrorPost() throws Exception { + expect(Result.FAILURE, "parallel/parallelErrorPost") + .logContains("the final failure block") + .hasFailureCase() + .go(); + } + } diff --git a/pipeline-model-definition/src/test/resources/parallel/parallelErrorPost.groovy b/pipeline-model-definition/src/test/resources/parallel/parallelErrorPost.groovy new file mode 100644 index 000000000..21f4c69aa --- /dev/null +++ b/pipeline-model-definition/src/test/resources/parallel/parallelErrorPost.groovy @@ -0,0 +1,33 @@ +pipeline { + options { + parallelsAlwaysFailFast() + skipDefaultCheckout() + } + agent none + stages { + stage('fails') { + steps { + error 'some problem' + } + } + stage('parallels') { + parallel { + stage('branch-1') { + steps { + echo 'branch 1' + } + } + stage('branch-2') { + steps { + echo 'branch 2' + } + } + } + } + } + post { + failure { + echo 'the final failure block' + } + } +} diff --git a/pom.xml b/pom.xml index 95451c8cf..4ccf836e5 100644 --- a/pom.xml +++ b/pom.xml @@ -83,7 +83,7 @@ org.jenkins-ci.plugins.workflow workflow-cps - 3953.v19f11da_8d2fa_ + 3961.ve48ee2c44a_b_3 org.jenkins-ci.main