Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-59583

JunitTestsPublisher: Also set stage result

    Details

    • Similar Issues:

      Description

      There is already a TODO in the code:

                      // TODO: Once JENKINS-43995 lands, update this to set the step status instead of the entire build.
                      // context.setResult(Result.UNSTABLE);
                      run.setResult(Result.UNSTABLE);
      

      Now with JENKINS-43995 done, this should be implemented via

      context.get(FlowNode.class).addAction(new WarningAction(Result.UNSTABLE).withMessage(...)
      

      or maybe even addOrReplaceAction() as in https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/workflow-basic-steps-2.18/src/main/java/org/jenkinsci/plugins/workflow/steps/UnstableStep.java#L73

        Attachments

          Issue Links

            Activity

            famod Falko Modler created issue -
            famod Falko Modler made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            famod Falko Modler made changes -
            Description There is already a TODO in the code:
            {code:java|title=https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.8.1/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/JunitTestsPublisher.java#L337-L339}
                            // TODO: Once JENKINS-43995 lands, update this to set the step status instead of the entire build.
                            // context.setResult(Result.UNSTABLE);
                            run.setResult(Result.UNSTABLE);
            {code}

            Now with JENKINS-43995 done, this should be implemented via
            {code:java}
            context.get(FlowNode.class).add(new WarningAction(Result.UNSTABLE).withMessage(...)
            {code}
            or maybe even `addOrReplaceAction()` as in https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/workflow-basic-steps-2.18/src/main/java/org/jenkinsci/plugins/workflow/steps/UnstableStep.java#L73
            There is already a TODO in the code:
            {code:java|title=https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.8.1/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/JunitTestsPublisher.java#L337-L339}
                            // TODO: Once JENKINS-43995 lands, update this to set the step status instead of the entire build.
                            // context.setResult(Result.UNSTABLE);
                            run.setResult(Result.UNSTABLE);
            {code}

            Now with JENKINS-43995 done, this should be implemented via
            {code:java}
            context.get(FlowNode.class).add(new WarningAction(Result.UNSTABLE).withMessage(...)
            {code}
            or maybe even {{addOrReplaceAction()}} as in https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/workflow-basic-steps-2.18/src/main/java/org/jenkinsci/plugins/workflow/steps/UnstableStep.java#L73
            famod Falko Modler made changes -
            Description There is already a TODO in the code:
            {code:java|title=https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.8.1/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/JunitTestsPublisher.java#L337-L339}
                            // TODO: Once JENKINS-43995 lands, update this to set the step status instead of the entire build.
                            // context.setResult(Result.UNSTABLE);
                            run.setResult(Result.UNSTABLE);
            {code}

            Now with JENKINS-43995 done, this should be implemented via
            {code:java}
            context.get(FlowNode.class).add(new WarningAction(Result.UNSTABLE).withMessage(...)
            {code}
            or maybe even {{addOrReplaceAction()}} as in https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/workflow-basic-steps-2.18/src/main/java/org/jenkinsci/plugins/workflow/steps/UnstableStep.java#L73
            There is already a TODO in the code:
            {code:java|title=https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.8.1/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/JunitTestsPublisher.java#L337-L339}
                            // TODO: Once JENKINS-43995 lands, update this to set the step status instead of the entire build.
                            // context.setResult(Result.UNSTABLE);
                            run.setResult(Result.UNSTABLE);
            {code}

            Now with JENKINS-43995 done, this should be implemented via
            {code:java}
            context.get(FlowNode.class).addAction(new WarningAction(Result.UNSTABLE).withMessage(...)
            {code}
            or maybe even {{addOrReplaceAction()}} as in https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/workflow-basic-steps-2.18/src/main/java/org/jenkinsci/plugins/workflow/steps/UnstableStep.java#L73
            famod Falko Modler made changes -
            Remote Link This issue links to "PR 227 (Web Link)" [ 23733 ]
            famod Falko Modler made changes -
            Link This issue depends on JENKINS-43995 [ JENKINS-43995 ]
            cleclerc Cyrille Le Clerc made changes -
            Status In Progress [ 3 ] Closed [ 6 ]
            Resolution Fixed [ 1 ]

              People

              • Assignee:
                famod Falko Modler
                Reporter:
                famod Falko Modler
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: