gpt4 book ai didi

jenkins - 为什么会出现这个错误? "No such property: Entry for class: java.util.Map"

转载 作者:行者123 更新时间:2023-12-05 01:41:42 24 4
gpt4 key购买 nike

我正在关注 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com