使用REST API触发VNext构建 [英] Triggering VNext Builds using REST API

查看:52
本文介绍了使用REST API触发VNext构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近已升级到TFS 2015.

We have recently upgraded to TFS 2015.

作为流程的一部分,我们使用命令行来触发每晚在TFS 2012中构建。但是当谈到TFS 2015 VNEXT版本时,我们无法使用TFS Build Start使用命令提示符。

As part of the process , we use command line to trigger the nightly builds in TFS 2012. But when it comes to TFS 2015 VNEXT builds we are unable to use the TFS Build Start using command prompt.

TFS 2015 vnext构建是否有任何方法可以使用API​​触发命令行

Is there any way that TFS 2015 vnext builds can trigger through command line using API's

如果任何人尽快分享详细信息,将会很有帮助。

It would be helpful if any one share the Details ASAP.

谢谢

Ravikumar

Ravikumar

Ravi j

推荐答案

嗨Ravi j,

Hi Ravi j,

感谢您在此发帖。

您可以使用此REST API触发构建:
https://www.visualstudio.com/en-us/docs/integrate/api/build/builds#queue-a-build

You could use this REST API to trigger a build: https://www.visualstudio.com/en-us/docs/integrate/api/build/builds#queue-a-build

HTTP方法:POST

HTTP method: POST

http://serverName:8080/tfs/DefaultCollection/TeamProjectName/_apis/build/builds?api-version=2.0


Content-Type:application / json

正文:

Content-Type: application/json

Body:

{ "definition": { "id": 25 },

" parameters" ;:" {\" system.debug \":\" fales \",\" BuildConfiguration \":\" debug \",\" ; BuildPlatform \":\" any cpu \"}"
}

"parameters": "{\"system.debug\":\"fales\",\"BuildConfiguration\":\"debug\",\"BuildPlatform\":\"any cpu\"}" }

祝你好运


这篇关于使用REST API触发VNext构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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