anyone got ideas ?
On Monday, March 6, 2017 at 6:17:12 PM UTC-8, Zeeshan Maqbool wrote:
>
> Simplified code which is easier to read :
>
> def mJenJobs = jenkins.model.Jenkins.getActiveInstance()..getAllItems()
> def mJenJobsSize = mJenJobs.size()
> def mResult = [] as Set
>
> for (i = 0; i < mJenJ
Simplified code which is easier to read :
def mJenJobs = jenkins.model.Jenkins.getActiveInstance()..getAllItems()
def mJenJobsSize = mJenJobs.size()
def mResult = [] as Set
for (i = 0; i < mJenJobsSize; i++)
{
def locJob = mJenJobs[i]
def running = locJob.getLastBuild().isBuilding()
i
one more thing to add which is pretty important and where the issue seems
to be, if I check class for [locJob.getLastBuiltOn()] it comes out to be
[hudson.model.Hudson],
whereas it should be Node according to this documentation
http://javadoc.jenkins.io/plugin/workflow-job/org/jenkinsci/plugins
Setup - Latest Jenkins with pipeline job set to run from MultiBranch
Pipeline (bitbucket)
Library Function - Its replacing the block plugin where you can specify
when this job should wait for other jobs running on a node
I havent seen issues with other functions but I am unable to get NodeName