Re: Unable to get NodeName in pipelines for WorkflowJob

2017-03-16 Thread Zeeshan Maqbool
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

Re: Unable to get NodeName in pipelines for WorkflowJob

2017-03-06 Thread Zeeshan Maqbool
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

Re: Unable to get NodeName in pipelines for WorkflowJob

2017-03-06 Thread Zeeshan Maqbool
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

Unable to get NodeName in pipelines for WorkflowJob

2017-03-06 Thread Zeeshan Maqbool
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