我有 cloudFormation.yaml 和 JenkinsFile.groovy。 在cloudFormation中有输出:
Outputs:
bucketName:
Value: !Ref BucketName
Description: 'bucket name'
我运行cloudFormation:
stage("run cloudFormation") {
steps {
script {
withAWS(credentials: awsCredentials) {
cfnUpdate(
stack: stackName,
file: "cloudFormation.yaml",
params: [
"uniqString=${uniqString}"
],
timeoutInMinutes: 10,
pollInterval: 600
)
}
}
}
}
如何在 JenkinsFile 中获取输出 backetName?
最佳答案
我相信你可以将它分配给一个变量
def outputs = cfnUpdate(...)
请参阅下面的链接了解更多信息: https://github.com/jenkinsci/pipeline-aws-plugin/blob/master/README.md
关于amazon-web-services - AWS CloudFormation 输出到 JenkinsFile 管道,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59198737/