我正在使用Extensible choice定义两个参数:NEXT_CHANGE
和NEXT_RELEASE
,如下所示:
但是当我尝试在NEXT_CHANGE
groovy脚本中使用NEXT_RELEASE
变量时,它不起作用。我尝试了这两种方法都没有成功:
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')]
有什么想法吗?