Issues using RunResultRecorder in pipelines

This issue is archived. You can view it, but you can't modify it. Learn more

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

            Assignee:
            Rolando-Mihai Vlad
            Reporter:
            Chris Rock
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: