TeamCity Rest API - 运行自定义构建
我正在尝试在项目上触发自定义构建,传入如上所述的特定修改Id 这里。
例如 httpAuth/action.html?add2Queue=bt27&modificationId=3605
这效果很好。但是我需要能够获取最后一次成功构建的修改 ID。我在其他 api 文档中看不到或找不到任何提及这一点的内容。
我能够检索上次成功构建的 buildId,但修改 ID 是 不包括,
例如 httpAuth/app/rest/buildTypes/id:bt27/builds/status:SUCCESS/number
有人知道如何从其余 api 获取修改 ID 列表吗?
I am trying to trigger a custom build on a project passing in a specific modificationId as mentioned here.
e.g httpAuth/action.html?add2Queue=bt27&modificationId=3605
This works great. However I need to be able to get the modificationId of the last know successful build. I cannot see or find any mention of this in the rest api docs.
I am able to retrieve the buildId of the last successful build but the modificationId is
not included
e.g httpAuth/app/rest/buildTypes/id:bt27/builds/status:SUCCESS/number
Does anybody know how to get a list of modificationIds from the rest api?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以获取特定项目或构建配置的所有构建,如下所示:
您可以过滤这些结果以仅显示最近成功的构建,如下所示:
使用脚本从上述 url 返回的构建中加载 href,您可以获取“lastChanges”元素,该元素始终包含最后一次更改的 ID。
然后,您可以发送下面的链接来触发构建,该构建将仅包含最多至该 ID 的更改,如下所示:
注意:
lastChanges 元素中的 ID 属性是您要用作修改 ID 的属性。但这并不是您的 VCS 中的实际更改 ID。这是团队城市内部 ID。
You can get all the builds for a particular project or build config like this:
You can filter these results to only show the most recent successful build like this:
Use a script to load the href from the build returned by the above url and you can get the "lastChanges" element, which always contains the ID of the last change.
You can then send the link below to trigger a build that will only include changes up to that ID like this:
NOTE:
The ID attribute in the lastChanges element is the one you want to use as the modificationID. This is not the actual change ID from your VCS though. This is an internal Team City ID.
您可以使用 url 获取修改列表
http://buildserver/httpAuth/app/rest/changes。您可以在 REST API 文档中找到更多信息。
You can get list of modifications using url
http://buildserver/httpAuth/app/rest/changes. You can find more info in REST API documentation.