I would like to set the result of a stage.
currentStage.result = 'SUCCESS' currentStage.result = 'FAILURE' currentStage.result = 'NOT_EXECUTED' currentStage.result = 'ABORTED'
- duplicates
-
JENKINS-26522 Annotated block/stage status
-
- Closed
-
[JENKINS-36087] Set stage result manually
Description |
Original:
I would like to set the result of a stage. {{ currentStage.result = 'SUCCESS' currentStage.result = 'FAILURE' currentStage.result = 'NOT_EXECUTED' currentStage.result = 'ABORTED' }} |
New:
I would like to set the result of a stage. {code} currentStage.result = 'SUCCESS' currentStage.result = 'FAILURE' currentStage.result = 'NOT_EXECUTED' currentStage.result = 'ABORTED' {code} |
Link |
New:
This issue duplicates |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Closed [ 6 ] |
Workflow | Original: JNJira [ 172737 ] | New: JNJira + In-Review [ 210157 ] |
Component/s | New: pipeline-general [ 21692 ] |
Component/s | Original: workflow-plugin [ 18820 ] |
Let's look at the desired result from a broader context: I what you're looking for here is really the ability to programmatically add additional information about stage execution (besides pass/fail) and display it in the UI. Does that sound about right?
The combination of https://issues.jenkins-ci.org/browse/JENKINS-26522 (annotated block status) and
JENKINS-26107(block-scoped stages, implemented in https://github.com/jenkinsci/pipeline-stage-step-plugin/pull/4) will give this result if a UI layer can be added on top of this (though it would require more complex analysis to generate this).I am imagine syntax like: https://issues.jenkins-ci.org/browse/JENKINS-26522?focusedCommentId=253869&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-253869
Then add some basic rules to allow custom coloring of stages based on whether some annotation is present (attached to either start or end node, stage view analyses by then will be smart enough to do what needs to be done).
That approach fits with the execution model for pipelines - you can build up state as you go by attaching Actions to the nodes (which get carried to the overall block).
Tagging jglick to see if he agrees or has a better notion here.