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

Issues using RunResultRecorder in pipelines

XMLWordPrintable

      There are two main issues I've seen attempting to use the RunResultRecorder in a pipelines job. First, when trying to use the Pipeline Syntax UI to create the correct step, the result is not useful as shown below:

      So after some digging, I was able to construct a general step using the class name and came up with: 

      step $class: 'RunResultRecorder', archiveTestResultsMode: 'Always archive HPE test reports'

      This structure produces the an error during execution:

      java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be cast to hudson.model.Project
      	at com.hpe.application.automation.tools.results.RunResultRecorder.perform(RunResultRecorder.java:1242)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:78)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:65)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)
      	at hudson.security.ACL.impersonate(ACL.java:260)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)

      I tried to use a non-pipeline job to test this out and the plugin worked fine, but we need to use pipelines for this job.

      Thanks!

      Possibly related to JENKINS-51293

            rolandomihaivlad Rolando-Mihai Vlad
            crock Chris Rock
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: