我正在尝试从jenkinsfile中的变量获取回购详细信息。有人可以指导为什么这不起作用吗?
parameters {
string(defaultvalue: "develop",description: 'enter the branch name to use',name: 'branch')
string(defaultvalue: "repo1",description: 'enter the repo name to use',name: 'reponame')
}
stage('Branch Update'){
dir("${param.reponame}"){
bat """ echo branch is ${params.branch}"""
}
}
运行上述命令时,出现以下错误消息:
groovy.lang.MissingPropertyException:没有此类属性:类groovy.lang.Binding的参数 [管道]}