您可以在 Azure Devops 的资源块中使用变量吗?
Can you use variables in resources block in Azure Devops?
在 Azure Devops 中,我可以在资源块中使用变量吗?我没有成功。
variables:
vmImageName: 'ubuntu-20.04'
repository: 'custom-forms-repo' # can be any name you want
resources:
repositories:
- repository: ${{ variables.repository }}
不,你不能。
在 YAML 中定义资源时,必须为资源的每个项目指定显式值。不支持使用变量指定资源上的值。
在 Azure Devops 中,我可以在资源块中使用变量吗?我没有成功。
variables:
vmImageName: 'ubuntu-20.04'
repository: 'custom-forms-repo' # can be any name you want
resources:
repositories:
- repository: ${{ variables.repository }}
不,你不能。
在 YAML 中定义资源时,必须为资源的每个项目指定显式值。不支持使用变量指定资源上的值。