Olya Kopylova
Olya Kopylova

Reputation: 23

How to find build by parameters in Jenkins?

There are a lot of builds in Jenkins, each has parameters. I know value of parameters and need to find all build with it.

Upvotes: 2

Views: 2877

Answers (1)

Somaiah Kumbera
Somaiah Kumbera

Reputation: 7489

Get your build history numbers from :

http://jenkins_url/job/project_name/api/json?tree=builds[number]

Then for each "number" in the builds array, find the params with

http://jenkins_url/job/project_name/<number>/api/json?tree=actions[parameters[*]]

If the resulting JSON contains your param, you got a hit

Upvotes: 2

Related Questions