在下游(getversion)作业中,我在shell脚本中创建了一个变量。我如何才能将其值分配给上游工作(该工作是管道工作)以回显消息?
def result = build job: 'getversion', parameters: [
[$class: 'StringParameterValue', name: 'repo', value: repo]
]// inside UI job getversion there is a script create variable version
echo result.buildVariables.version //=> it is error
echo version //it prints value of version variable