简体   繁体   English

使用REST API对基于TFS2015 XAML的构建和传递参数进行排队

[英]Queue TFS2015 XAML based build and pass on parameter using REST API

I am trying to start a build from Powershell using the TFS 2015 REST API. 我正在尝试使用TFS 2015 REST API从Powershell开始构建。 I am sucessful in starting a new build using REST API after following the Post . 在遵循Post之后,我成功地使用REST API开始了新的构建。

Now i am trying to pass some custom parameter that appears in the Build def parameter through the REST API. 现在,我试图通过REST API传递一些出现在Build def参数中的自定义参数。 I am not sure whether it can be done, if anyone has any previous knowledge please help. 我不确定是否可以做到,如果有人以前有知识请帮忙。

I am using TFS 2015 and XAML based build. 我正在使用TFS 2015和基于XAML的版本。

There is an optional option with REST API for querying build called parameters : Parameters to pass to the build. REST API有一个可选选项,用于查询称为参数的构建: 传递给构建的参数。 This is optional. 这是可选的。 If not specified, the default variables for the definition will be used. 如果未指定,将使用定义的默认变量。

Example: 例:

"parameters": "{\"system.debug\":\"true\",\"BuildConfiguration\":\"debug\",\"BuildPlatform\":\"x64\"}"

More details please refer the document from MSDN: Builds 更多详细信息,请参阅从MSDN文档: 构建

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

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