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

          Martin Stolle created issue -

          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.
          Martin Stolle made changes -
          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}

          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
          Sam Van Oort made changes -
          Link New: This issue duplicates JENKINS-26522 [ JENKINS-26522 ]
          Sam Van Oort made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 172737 ] New: JNJira + In-Review [ 210157 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]

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

              Created:
              Updated:
              Resolved: