简体   繁体   English

tfs 2013 pass生成变量post build脚本powershell

[英]tfs 2013 pass build variable post build script powershell

I am using default build template with TFS 2013 and want to pass the name of the person, who initiated the build, as a variable to a post build powershell script. 我在TFS 2013中使用默认的构建模板,并希望将启动构建的人员的名称作为变量传递给构建后Powershell脚本。 I know, that there are a couple of "env:TF_BUILD..." variables, that are filled during build process, but I couldn't find a variable, that holds the "user", who triggered the build. 我知道,在构建过程中填充了几个“ env:TF_BUILD ...”变量,但是我找不到一个变量,该变量保存了触发构建的“用户”。 The variable I am looking for is suppose to be something like "$BUILD_REQUESTEDFOR". 我正在寻找的变量应该是类似“ $ BUILD_REQUESTEDFOR”的东西。

I try to put a -user "$BUILD_REQUESTEDFOR" into section 2.5 as Post-build script arguments in a build definition, but it seems, that it wouldn't be filled or interpreted. 我试图将-user“ $ BUILD_REQUESTEDFOR”放在构建定义中作为Post-build脚本参数放入第2.5节中,但是看来,它不会被填充或解释。

Is there something i have missed or is there an other way to get my problem solved. 是否有我错过的事情,或者有其他方法可以解决我的问题。

Any help appreciated. 任何帮助表示赞赏。

The predefined variable "$BUILD_REQUESTEDFOR" is only available for vNext build (TFS 2015 and later version). 预定义变量“ $ BUILD_REQUESTEDFOR”仅适用于vNext构建(TFS 2015及更高版本)。 See Build variables for details. 有关详细信息,请参见构建变量

For xaml build, there isn't the variable to get the current user who triggered the build within the build process. 对于xaml构建,没有变量来获取在构建过程中触发构建的当前用户。 See Team Foundation Build environment variables for details. 有关详细信息,请参见Team Foundation Build环境变量

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM