Jenkins get list of builds and parameters
I would like to make an API call to Jenkins to fetch a list of builds along with their parameters and status. We currently pass a git commit sha1 as a parameter to build a specific branch. Any ideas how I can get this information easily?
2 Solutions collect form web for “Jenkins get list of builds and parameters”
Jenkins provides a nice api.
It is documented at:
You probably want something like:
As far as I know, this can’t be done in a single API call.
First query all builds.
This will return xml or json output, respectively.
Once you get the build numbers, you can query each build number.
Then you can check the SHA in the result against your SHA.