From 6ae91663b44eca3a883608774815da223e2d39bd Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Thu, 5 Sep 2024 11:12:47 -0400 Subject: [PATCH 1/2] [JENKINS-73726] Reproduced error in test --- .../modeldefinition/ParallelTest.java | 9 +++++ .../parallel/parallelErrorPost.groovy | 33 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 pipeline-model-definition/src/test/resources/parallel/parallelErrorPost.groovy 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' + } + } +} From 0b38cfa239e91bc7617dbeb8c86102ce1ef8e342 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Thu, 5 Sep 2024 16:09:25 -0400 Subject: [PATCH 2/2] https://github.com/jenkinsci/workflow-cps-plugin/pull/931 released --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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