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'