jenkins - how do i get latest build in jenkns with specified parameter -


i asked question how latest build in jenkns specified parameter, , solutions

http://localhost:8080/job/myjenkinsjob/api/xml?tree=builds[actions[parameters[value]],number]&xpath=//build[action[parameter[value="myparametervalue"]]]/number&wrapper=list 

however return multiple build numbers, want latest (one build number only)

<list><number>49</number><number>48</number></list> 

i tried several variation xpath , didnt work

does xpath: select first element specific attribute @ all?

so:

http://localhost:8080/job/myjenkinsjob/api/xml?tree=builds[actions[parameters[value]],number]&xpath=(//build[action[parameter[value="myparametervalue"]]])[0]/number&wrapper=list  

or perhaps brackets need elsewhere


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -