From a54596caac81421c7dad56b6a9b56d4ce41bce16 Mon Sep 17 00:00:00 2001 From: Dries De Peuter Date: Thu, 11 Jun 2026 11:49:23 +0200 Subject: [PATCH 1/2] fix: don't attach UserInterruption with null user id on [skip ci] abort [skip ci] builds are SCM-triggered, so env.BUILD_USER_ID is null. UserInterruption stores the null user id and its hashCode() throws NPE inside FlowInterruptedException.handle() during WorkflowRun.finish(), aborting completion before RunListener.fireCompleted() runs. That skipped the GitHub Branch Source final commit status, leaving [skip ci] commits stuck on a pending status. Throw without a cause and with actualInterruption false instead, and guard against a missing previous build. --- src/io/stenic/jpipe/plugin/SkipCommitPlugin.groovy | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/io/stenic/jpipe/plugin/SkipCommitPlugin.groovy b/src/io/stenic/jpipe/plugin/SkipCommitPlugin.groovy index 0fc0e15..741e3a0 100644 --- a/src/io/stenic/jpipe/plugin/SkipCommitPlugin.groovy +++ b/src/io/stenic/jpipe/plugin/SkipCommitPlugin.groovy @@ -3,7 +3,6 @@ package io.stenic.jpipe.plugin import io.stenic.jpipe.event.Event import org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException import org.jenkinsci.plugins.workflow.steps.FlowInterruptedException -import jenkins.model.CauseOfInterruption.UserInterruption import hudson.model.Result class SkipCommitPlugin extends Plugin { @@ -43,7 +42,14 @@ class SkipCommitPlugin extends Plugin { // event.script.currentBuild.getRawBuild().setResult(Result.fromString(event.script.currentBuild.getPreviousBuild().result)) // } catch (RejectedAccessException e) {} - throw new FlowInterruptedException(Result.fromString(event.script.currentBuild.getPreviousBuild().result), true, new UserInterruption(event.script.env.BUILD_USER_ID)) + // Do not attach a UserInterruption cause: [skip ci] builds are SCM-triggered, + // so BUILD_USER_ID is null. UserInterruption stores the null user id and its + // hashCode() NPEs inside FlowInterruptedException.handle() during + // WorkflowRun.finish(), which aborts completion before + // RunListener.fireCompleted() runs. That skips the GitHub Branch Source + // final commit status, leaving the commit stuck on "pending". + // actualInterruption is false because nobody actually interrupted the build. + throw new FlowInterruptedException(Result.fromString(event.script.currentBuild.getPreviousBuild()?.result ?: 'SUCCESS'), false) } return true From acefa8b0fd60eb6b7e5978993d4cee2d338ff109 Mon Sep 17 00:00:00 2001 From: Dries De Peuter Date: Thu, 11 Jun 2026 11:49:23 +0200 Subject: [PATCH 2/2] fix: repair maven test setup - repo.jenkins-ci.org no longer serves plain http (308 redirect) - jenkins-core and servlet-api must be on the compile classpath since main sources import hudson.model.Result and friends --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 415cdd9..3afb70b 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ jenkins-releases Jenkins Releases - http://repo.jenkins-ci.org/releases + https://repo.jenkins-ci.org/releases @@ -82,7 +82,7 @@ org.jenkins-ci.main jenkins-core ${jenkins.version} - test + provided org.jenkins-ci.plugins.workflow @@ -121,7 +121,7 @@ javax.servlet javax.servlet-api ${jenkins.servlet.version} - test + provided org.jenkins-ci.plugins