title: How to get output of jenkins pipeline in a specific format?
body: <p>I am trying  to implement Machine learning in my  jenkins pipeline.
  <br>For that I need output data of pipeline for each build.</p>
  
  <p>Some parameters that i need are:</p>
  
  <ol>
  <li>Which user triggered the pipeline</li>
  <li>Duration of pipeline</li>
  <li>Build number with its details</li>
  <li>Pipeline pass/fail</li>
  <li>If fail, at which stage it failed.</li>
  <li>Error in the failed stage. (Why it failed)</li>
  <li>Time required to execute each stage</li>
  <li>Specific output of each stage (For. eg. : If a stage contains sonarcube execution then output be kind of percentage of codesmells or code coverage)</li>
  </ol>
  
  <p>I need to fetch these details for all builds. How can get it? </p>
  
  <p>There is jenkins api that can be implemented in python but i was able to get only JOB_NAME, Description of job, IS job Enabled.
  These details werent useful.</p>