作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在关注 JENKINS-44085 中的示例发布关于创建阶段映射的最底层评论,几乎到 T,但是当我执行我的代码时,我得到了
No such property: Entry for class: java.util.Map
这是我的代码。变量“管道”在其他地方定义,并且有效。
def generateStage(String job, String targetVersion,
String rootVersion, Integer sleepTime=0) {
return {
stage("Deploying: ${job}") {
sleep sleepTime
pipeline.executeDeploymentPipeline(job,
targetVersion,
rootVersion)
}
}
}
def deployProcs(targetVersion, rootVersion) {
int sleepTime = 0
def procs = ["proc-proc", "proc-proc-high"]
def parallelStagesMap = procs.collectEntries {
["${it}" : generateStage(it, targetVersion, rootVersion, sleepTime)]
sleepTime += 5
}
parallel parallelStagesMap
}
这是为什么?
最佳答案
这似乎是一个 bug在 Jenkins 管道中。 related one在 2.158 版本之后被修复。所以升级 Jenkins 应该可以解决这个问题。
关于jenkins - 为什么会出现这个错误? "No such property: Entry for class: java.util.Map",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53876013/
我是一名优秀的程序员,十分优秀!