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

          [JENKINS-59583] JunitTestsPublisher: Also set stage result

          Falko Modler created issue -
          Falko Modler made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Falko Modler made changes -
          Description Original: 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
          New: 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
          Falko Modler made changes -
          Description Original: 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
          New: 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
          Falko Modler made changes -
          Remote Link New: This issue links to "PR 227 (Web Link)" [ 23733 ]
          Falko Modler made changes -
          Link New: This issue depends on JENKINS-43995 [ JENKINS-43995 ]

          fixed in 3.8.2

          Cyrille Le Clerc added a comment - fixed in 3.8.2
          Cyrille Le Clerc made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: