How to access a build's custom variable in script in TFS 2015?

扶醉桌前 提交于 2019-12-01 23:08:08

[disclaimer: I work on the new build system]

I often advise folks to use the cmdline task or a cmd script to print out the variables (call set on windows, env on *nix). There's docs etc... but actually running it will show exactly what is really available.

Add cmdline task (in utility) with tool = cmd and arguments = /k set

Variables on the definitions variable tab should be available as environment variables upper cased

So:

my variable

Is available as the environment variable

MY VARIABLE

There is a current bug, it should be per spec MY_VARIABLE. On the xplat agent/shell script it's MY_VARIABLE

This makes it accessible to cmd, powershell, shell etc... scripts.

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