Azure DevOps(VSTS)通过YAML链接变量组 [英] Azure DevOps (VSTS) link variable group through YAML

查看:70
本文介绍了Azure DevOps(VSTS)通过YAML链接变量组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用YAML进行构建时,我找不到如何给出引用我要使用的变量组的指令.我必须在VSTS构建UI中手动打开构建定义并创建链接.

When using YAML for builds, I could not find how to give an instruction that refers to the variable group I want to use. I had to manually open my build definition in the VSTS builds UI and create the link.

有人知道如何通过YAML引用变量组吗?

Does anyone know how to refer the variable group through the YAML?

推荐答案

YAML架构现在支持此功能.

This is now supported in YAML Schema.

为便于快速参考,从他们的文档中看,用法如下:

For quick reference, from their documentation the usage looks like:

variables:
- group: my-variable-group
- name: my-bare-variable
  value: 'value of my-bare-variable'

我在寻求对动态设置变量组名称的支持时遇到了这种情况,例如:-group: connectioninfo-$(env),但是目前不支持.如果将来对变量组的这种增强也引起您的兴趣,则此问题就位于此处.

I came across this when looking for support for setting the variable group name dynamically such as: -group: connectioninfo-$(env) but this is currently not supported. The issue on this is located here in case this enhancement to variables groups is of interest to you in the future as well.

https://github.com/MicrosoftDocs/vsts-docs/issues/3702

这篇关于Azure DevOps(VSTS)通过YAML链接变量组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆