Is there a way to do nested variables in VSTS Release Management

☆樱花仙子☆ 提交于 2019-12-01 20:32:24

VSTS has a different approach: you can defined the variables at the Release Definition level or at the Environment level (see https://www.visualstudio.com/en-us/docs/build/concepts/definitions/release/variables).

The two approaches you listed can work good. And VSTS release support nested variables.

Except define a variable in release definition (or environment variable) or use it directly, you can add the variable CodeNetworkShare1=$(CodeNetworkShare.$(Release.EnvironmentName)) directly in variable group. Then in your release definition, it can use applied with different values for different environment names.

VSTS now has the option of linking variable groups to different environments within the same release definition. Create separate variable groups for each environment (dev, test, prod, or maybe just dev and prod, if e.g. test is in production environment) and then link that group to correct environments in the link page. See more in my other answer here: Is there a way to use VSTS Variable Groups per environment?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!