如何在 azure 构建到发布管道中将变量从构建传递到发布:我们在 CI 管道中有变量 --> 我们必须在发布管道中传递该变量 --> 该变量必须在另一个 yaml 文件中设置。这可能吗?
bash environment-variables build-pipeline azure-devops azure-pipelines-release-pipeline
例如,在 variable.tf 文件中,我们有如下代码
variable "variable1" {
type = string
default = "ABC"
}
variable "variable2" {
type = string
default = "DEF"
}
variable "variable3" {
type = string
default = "$var.variable1-$var.variable2"
}
Run Code Online (Sandbox Code Playgroud)
预期输出:
变量 3 = ABC-DEF
azure-devops ×1
azure-pipelines-release-pipeline ×1
bash ×1
devops ×1
terraform ×1
variables ×1