What feature do you want to see added?
Description
I am using the Checks API plugin in a Jenkins pipeline and running into an issue where an aborted build incorrectly reports a FAILURE status to GitHub instead of SKIPPED.
Context & Use Case
In our Jenkins pipeline, the first stage evaluates specific conditions to determine if the build should proceed. If the conditions are not met, we intentionally abort the pipeline using:
currentBuild.result = 'ABORTED'
We use this approach to signal that a job was skipped rather than failed.
The Problem
Currently, the Checks API plugin maps an ABORTED build to a CANCELED check conclusion:
|
else if (result.isBetterOrEqualTo(Result.ABORTED)) { |
|
return ChecksConclusion.CANCELED; |
|
} |
When the Jenkins pipeline finishes after being aborted, the automatic final check is published with a FAILURE status.
I tried to manually override this by adding a publishChecks step in that first stage right before the pipeline ends:
publishChecks(
name: 'Jenkins',
status: 'COMPLETED',
conclusion: 'SKIPPED',
title: 'Jenkins job',
summary: 'Job aborted'
)
While this manually published check triggers successfully during execution, it gets completely overwritten by the plugin's default finalization logic once the build fully completes, reverting the status back to FAILURE.
Question
Is it currently possible to configure the Jenkins Checks API plugin to map an ABORTED build status to a SKIPPED GitHub check conclusion? Alternatively, can we manually publish a check outcome from within the pipeline without the plugin overriding it once the build finishes?
If not, could this be considered as a feature request similarly to how it was done for UNSTABLE builds in Issue #46?
Upstream changes
No response
Are you interested in contributing this feature?
No response
What feature do you want to see added?
Description
I am using the Checks API plugin in a Jenkins pipeline and running into an issue where an aborted build incorrectly reports a
FAILUREstatus to GitHub instead ofSKIPPED.Context & Use Case
In our Jenkins pipeline, the first stage evaluates specific conditions to determine if the build should proceed. If the conditions are not met, we intentionally abort the pipeline using:
We use this approach to signal that a job was skipped rather than failed.
The Problem
Currently, the Checks API plugin maps an
ABORTEDbuild to aCANCELEDcheck conclusion:checks-api-plugin/src/main/java/io/jenkins/plugins/checks/status/BuildStatusChecksPublisher.java
Lines 152 to 154 in fa7f8da
When the Jenkins pipeline finishes after being aborted, the automatic final check is published with a
FAILUREstatus.I tried to manually override this by adding a
publishChecksstep in that first stage right before the pipeline ends:publishChecks( name: 'Jenkins', status: 'COMPLETED', conclusion: 'SKIPPED', title: 'Jenkins job', summary: 'Job aborted' )While this manually published check triggers successfully during execution, it gets completely overwritten by the plugin's default finalization logic once the build fully completes, reverting the status back to
FAILURE.Question
Is it currently possible to configure the Jenkins Checks API plugin to map an ABORTED build status to a SKIPPED GitHub check conclusion? Alternatively, can we manually publish a check outcome from within the pipeline without the plugin overriding it once the build finishes?
If not, could this be considered as a feature request similarly to how it was done for
UNSTABLEbuilds in Issue #46?Upstream changes
No response
Are you interested in contributing this feature?
No response