Details

    • Similar Issues:

      Description

      I would like to set the result of a stage.

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

        Attachments

          Issue Links

            Activity

            martin_stolle Martin Stolle created issue -
            Hide
            svanoort 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 Jesse Glick to see if he agrees or has a better notion here.

            Show
            svanoort 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 Jesse Glick to see if he agrees or has a better notion here.
            Hide
            martin_stolle 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.

            Show
            martin_stolle 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 Martin Stolle made changes -
            Field Original Value New Value
            Description I would like to set the result of a stage.

            {{
            currentStage.result = 'SUCCESS'
            currentStage.result = 'FAILURE'
            currentStage.result = 'NOT_EXECUTED'
            currentStage.result = 'ABORTED'
            }}
            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}
            Hide
            svanoort 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

            Show
            svanoort 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
            svanoort Sam Van Oort made changes -
            Link This issue duplicates JENKINS-26522 [ JENKINS-26522 ]
            svanoort Sam Van Oort made changes -
            Status Open [ 1 ] Closed [ 6 ]
            Resolution Fixed [ 1 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 172737 ] JNJira + In-Review [ 210157 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]
            Hide
            k_roland Ken Roland added a comment -

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

            Show
            k_roland Ken Roland added a comment - Sam Van Oort , you closed this as fixed instead of duplicate. Got me all excited for a minute
            jbochenski Jakub Bochenski made changes -
            Resolution Fixed [ 1 ]
            Status Closed [ 6 ] Reopened [ 4 ]
            jbochenski Jakub Bochenski made changes -
            Status Reopened [ 4 ] Resolved [ 5 ]
            Resolution Duplicate [ 3 ]
            Hide
            kameshraj 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?

            Show
            kameshraj 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?

              People

              • Assignee:
                svanoort Sam Van Oort
                Reporter:
                martin_stolle Martin Stolle
              • Votes:
                2 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: