5

I would like to ask is there any way to query run time build steps by using Jenkins pipeline REST API? I refer to this link https://github.com/jenkinsci/pipeline-stage-view-plugin/tree/master/rest-api and it seems like I can't get a run time build steps command line that I configure for Jenkins pipeline job.

Any suggestions?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
IAMbeginner
  • 269
  • 1
  • 3
  • 14
  • Using pipeline-stage-view-plugin API `/job/myJob/2/execution/node/54/wfapi/describe` I see JSON results like `"name": "Shell Script", "parameterDescription": "git clean -xfd",` which corresponds to my Jenkinsfile: `sh "git clean -xfd"`. Can you expand what information you can't get? – Carl Walsh Jul 13 '21 at 01:53

1 Answers1

-1

It seems there is no possibility to get this information via the REST API. I found a solution somewhere. With

http://Serverurl/job/jobname/config.xml

you can download the config file and parse the XML. Doing it with PowerShell and it's working fine.

Massimo
  • 15
  • 6