retriving the buildNumber of a new build remotely through xml apis
To fire build on a hudson remotely i use the folloi开发者_运维百科ng url.
http://machinename:port/job/jobname/buildwithparamaeters?paramnam=value¶mname2=value2
Now after firing this url i want to retrieve the build Number that was generated for this specific build?
How can i retrive it remotely through xml apis?
You can get the next build number before you start the build (http://server/job/api/xml) but this of course not realiable, cause before you start a build you can't be anyone else will start that build. Furthermore you can get the lastBuild number by the entry. But i'm not sure under which circumstances this give the correct number, cause you have to be aware of the currentBuild flag as far as i know.
精彩评论