I would like to set the result of a stage.

      currentStage.result =  'SUCCESS'
      currentStage.result =  'FAILURE'
      currentStage.result =  'NOT_EXECUTED'
      currentStage.result =  'ABORTED'
      

          [JENKINS-36087] Set stage result manually

          Sam Van Oort added a comment -

          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.

          Sam Van Oort added a comment - 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.

          Martin Stolle added a comment -

          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?

          That sounds right. The annotated block status is pretty similar to my ticket.

          Martin Stolle added a comment - 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? That sounds right. The annotated block status is pretty similar to my ticket.

          Sam Van Oort added a comment -

          martin_stolle I'm going to go ahead and close this one out as a duplicate of JENKINS-26522 but add a note that it needs a UI representation there which maps to stage view

          Sam Van Oort added a comment - martin_stolle I'm going to go ahead and close this one out as a duplicate of JENKINS-26522 but add a note that it needs a UI representation there which maps to stage view

          Ken Roland added a comment -

          svanoort, you closed this as fixed instead of duplicate. Got me all excited for a minute

          Ken Roland added a comment - svanoort , you closed this as fixed instead of duplicate. Got me all excited for a minute

          Kamesh Velu added a comment -

          I don't see a fix or resolution for this issue? but the issue's status is Resolved, should this be open instead?

          Kamesh Velu added a comment - I don't see a fix or resolution for this issue? but the issue's status is Resolved, should this be open instead?

            svanoort Sam Van Oort
            martin_stolle Martin Stolle
            Votes:
            2 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: