Jenkins无法识别Groovy代码IsBuilding()方法

时间:2018-10-26 19:32:01

标签: jenkins groovy

for (item in Hudson.instance.items) {   
    jobName =item.getFullDisplayName()   
manager.listener.logger.println "JobName: " + jobName   
// check that job is not building   
    if  (!item.isBuilding())   
         {
         for (node in Hudson.getInstance().getNodes())
         {
          manager.listener.logger.println "  Node: " + node.getDisplayName()
           workspacePath = node.getWorkspaceFor(item)
           if (workspacePath == null)
           {
             manager.listener.logger.println " Could not get workspace path"
           }
       }   }   else   {
       println("Skipping job " + jobName + ", currently building")   } }

我在jenkins上将这些代码作为groovy脚本运行时出错

Groovy脚本失败: groovy.lang.MissingMethodException:方法的无签名:org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject.isBuilding()适用于参数类型:()值:[]

0 个答案:

没有答案