我只写流水线中主要的配置部分
environment {
VERSION=""
}
stages {
stage('随便吧') {
steps {
script{
VERSION = sh (
script: '''
XXXX
''',
returnStdout: true
).trim()
}
}
}
}
参考
https://www.jianshu.com/p/2cdc8efedf2f