Martin B.'s solution worked for me. My project is running UI tests
differentiated by a parameter, some of which stall the log while the
accessibility driver searches for UI elements. For this reason, I can't use
isLogUpdated either.
On Thursday, March 28, 2013 5:15:56 AM UTC-7, Martin B. wrote:
>
> On 28.03.2013 10:45, Martin Ba wrote:
> > This groovy script:
> >
> > runningJobs = hudson.model.Hudson.instance.items.findAll{job ->
> > job.isBuilding()}
> > runningJobs.each{run -> println(run.name)}
> >
> > Will return an empty result for a Job that has [Execute concurrent
> > builds if necessary] set and where there are runs in progress, but the
> > last run has already finished. (From:
> > /core/src/main/java/hudson/model/Job.java it would appear that it just
> > returns the status of the last build.)
> >
>
> Anyways ... workaround for me:
>
> import hudson.model.*;
>
> def myJobs = hudson.model.Hudson.instance.items.findAll{job ->
> job.name=="Test_Main"}
>
> def jobsRuns = myJobs.collect{job -> job.getBuilds()}
> def jobRuns = jobsRuns.flatten()
> buildingRuns = jobRuns.findAll{run -> run.building}
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.