Get Jenkins Pipeline Build steps

Viewed 35

I have a jenkins pipeline which I have written using Declarative pipeline syntax. The pipeline is running fine. I am able to view steps and detailed steps.

Now, the client has a requirement where they want to see these steps in a report fashion. They want to show/handover these reports to their audit firm. The thing is they don't want to give their audit firm jenkins access. The audit firm should be able to view whatever is going on in the pipeline.

So, I made the console output of the build in a pdf file. Now, they want to see the steps too.

First is the simple pipeline steps view,

simple pipeline steps view

Second is the detailed pipeline steps view,

detailed pipeline steps

Now I have to display this in another file.

  • Is there a plugin to export these steps in a visual format?

  • If not using a plugin, is there an API from which I can extract the text of these steps? I see they are not available in the /api/json endpoint of a build.

  • Anything else that can be done?

Thanks.

1 Answers

BlueOcean API has the info you need at

${YOUR_JENKINS_URL}/blue/rest/organizations/jenkins/pipelines/${JOB_NAME}/runs/${BUILD_ID}/nodes/"
Related