我使用Extensible choice定义两个参数:NEXT_CHANGE和NEXT_RELEASE,如下所示:

但是,当我尝试在NEXT_RELEASE groovy脚本中使用NEXT_CHANGE变量时,它不起作用。我尝试了这两种方法,但都没有成功:
def hardcoded_param = "NEXT_CHANGE"
def resolver = build.buildVariableResolver
def hardcoded_param_value = resolver.resolve(hardcoded_param)
return [hardcoded_param_value]和
def thr = Thread.currentThread()
def build = thr?.executable
def envVarsMap = build.parent.builds[0].properties.get("envVars")
eturn [envVarsMap.get('NEXT_CHANGE')]有什么想法吗?
https://stackoverflow.com/questions/38634259
复制相似问题