groovy.util.slurpersupport.NodeChild - Jenkins groovy命令出错

时间:2017-01-31 05:18:20

标签: jenkins groovy jenkins-pipeline

def PackageLibrary(compName, projectPath){
    try{
        zipFile = "${compName}" + ".zip"
        zipCommand = "dir: " + "${projectPath}" + ", glob: '', zipFile: " + "${zipFile}"
        dir("${zipFolder}"){
            println "Zip completed************************************************* ${projectPath}"
            zip "${zipCommand}"
            println "Zip completed************************************************* ${projectPath}"
        }
    } catch(err) {
        echo "Caught: ${err}"
    } 
}

我正在尝试执行上述命令,但我收到groovy.util.slurpersupport.NodeChild错误。日志:

Zip completed************************************************* ./Application_Source/TestVS10XML/obj/Debug/Package
[Pipeline] zip
Writing zip file of d:\software\jenkins\Package to d:\software\jenkins\Package\dir: .\Package, glob: '', zipFile: .TestVS10XML.zip
[Pipeline] }
[Pipeline] // dir
[Pipeline] echo
Caught: java.io.NotSerializableException: groovy.util.slurpersupport.NodeChild'

0 个答案:

没有答案