我有一个詹金斯管道文件,我需要在其中调用sh文件
node {
stage("Stage1") {
checkout scm
sh '''
echo "Invoking the sh script"
valueNeedstobepassed = "test"
'''
}
stage ('stage2') {
Need to refer the "valueNeedstobepassed" varaible in my
pipleline step
}
}
在第二阶段,我无法引用变量“ valueNeedstobepassed”
请帮忙吗?