Determine if given job is currently running using Hudson/Jenkins API -


Is there an API to determine if a given job is currently running?

Ideally, I also like to be able to complete my estimated% completion and get details of the SVN revision number and also comment!

Edit:

I got the answer. http: // host / job / project / lastbuild / api / almost all I need is this! If you kick the manual build, it will not tell you the SCM changes, but it makes sense. It still tells you the latest SCM modification, so it's good. Everything is fine, enough for my purposes right now

Gareth_Bables and Sagar using Jenkins said the way to know the API is if you add depth to 1 , You will see what you are looking for:

  http: // host / job / project / lastbuild / api / xml? Depth = 1   

You will see whether this build is running or not

  ...  

You will see & lt; Construction & gt; tag & lt; Action & gt; & Lt; Reason & gt; & Lt; ShortDescription & gt; User-initiated Zageyiff & lt; / ShortDescription & gt; & Lt; UserId> Zageyiff & lt; / UserId> & Lt; Username & gt; Zageyiff & lt; / Username & gt; & Lt; / Cause & gt; & Lt; / Action & gt; & Lt; Building & gt; True & lt; / Create & gt; & Lt; Period & gt; 0 & lt; / Period & gt; & Lt; EstimatedDuration & gt; -1 & lt; / EstimatedDuration & gt; & Lt; FullDisplayName & gt; Project # 12 & lt; / FullDisplayName & gt; & Lt; ID & gt; 2012-08-24_08-58-45 & lt; / Id & gt; & Lt; KeepLog & gt; False & lt; / KeepLog & gt; & Lt; Number & gt; 12 & lt; / Number & gt; & Lt; Timestamp & gt; 123456789 & lt; / Timestamp & gt; & Lt; URL & gt; Http: // host / job / project / 12 & lt; / Url & gt; & Lt; BuiltOn & gt; Master & lt; / BuiltOn & gt; & Lt; ChangeSet / & gt; & Lt; MavenVersionUsed & gt; 3.0.3 & lt; / MavenVersionUsed & gt; & Lt; / Create & gt; ...

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -