我正在尝试并行生成并启动构建阶段以获取循环中的项目列表:
steps {
...
PROJECT_LIST = []
PROJECT_LIST += "project1"
PROJECT_LIST += "project2"
PROJECT_LIST += "project3"
for (def element = 0; element < PROJECT_LIST.size(); element++) {
//parallel {
stage("Parallel build run on ${PROJECT_LIST[element]}") {
build_project "${PROJECT_LIST[element]}"
}
}
//}
...
}
我可以毫无问题地运行它的各个阶段,但是当我取消注释时
parallel {}
语句我得到java.lang.IllegalArgumentException:预期的命名参数但是得到了org.jenkinsci.plugins.workflow.cps.CpsClosure2@3de759b7错误。