如何从固定版本的 teamcity 5.1 获取 xml feed?

发布于 2024-09-19 03:40:30 字数 70 浏览 1 评论 0原文

希望获取刚刚固定的构建的 xml feed。我发现我可以过滤成功/不成功的构建,但找不到按固定过滤的标志/选项。有什么建议吗?

Looking to get an xml feed of just pinned builds. I see that I can filter on successful / unsuccessful builds, but can't find a flag / option to filter by pinned. Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

茶底世界 2024-09-26 03:40:39

不是您所要求的,但正如我在搜索版本 9 的类似内容时发现的这个问题:

在 TeamCity 9 上,您可以轻松访问

https://teamcity.YOURCOMPANY.com/app/rest/builds?locator=pinned:true

文档:https://confluence.jetbrains.com/display/TCD9/REST+API#RESTAPI-BuildLocator

Not what you asked for, but as I found this question when searching for a similar thing for Version 9:

On TeamCity 9, you can easily just access

https://teamcity.YOURCOMPANY.com/app/rest/builds?locator=pinned:true

Documentation: https://confluence.jetbrains.com/display/TCD9/REST+API#RESTAPI-BuildLocator

如梦初醒的夏天 2024-09-26 03:40:37

查看 TeamCity 中的 Rest API

您可以加载列表所有构建:

http://YOURSERVER/httpAuth/app/rest/builds

结果是像这样的内容:

<builds nextHref="/httpAuth/app/rest/builds?count=100&start=100" count="100">
   <build id="4324" number="273" status="SUCCESS" buildTypeId="bt9" href="/httpAuth/app/rest/builds/id:4324" webUrl="http://YOURSERVER/viewLog.html?buildId=4324&buildTypeId=bt9"/>
   <build id="4323" number="283" status="ERROR" buildTypeId="bt10" href="/httpAuth/app/rest/builds/id:4323" webUrl="http://YOURSERVER/viewLog.html?buildId=4323&buildTypeId=bt10"/>
   <build id="4322" number="56" status="SUCCESS" buildTypeId="bt44" href="/httpAuth/app/rest/builds/id:4322" webUrl="http://YOURSERVER/viewLog.html?buildId=4322&buildTypeId=bt44"/>
</builds>

通过查看 href,您可以获得此版本的详细信息。还有一个属性 pinned

可以通过添加 GET 参数来控制构建列表的计数和开始位置,如下所示: ?count=5&start=200

如果如果您希望将其用于特定项目或项目配置,则必须这样做:

使用此 API,您可以检索所有项目。
(使用 http://YOURSERVER/httpAuth/app/rest/projects

有了这些信息,您可以获取配置。
(示例: http://YOURSERVER/httpAuth/app/rest/projects/id:project3

在这里您可以获得有关特定配置的详细信息:
(示例:http://YOURSERVER/httpAuth/app/rest/buildTypes/id:bt17

最后,通过此列表,您可以获得此构建的详细信息:
(示例:http://YOURSERVER/httpAuth/app/rest/builds/id:4144

最后一次调用的结果是这样的:

<build id="4271" number="151" status="SUCCESS" href="/httpAuth/app/rest/builds/id:4271" webUrl="http://YOURSERVER/viewLog.html?buildId=4271&buildTypeId=bt2" personal="false" history="false" pinned="false">
<statusText>Tests passed: 177</statusText>
<buildType id="bt2" name="trunk Legacy" href="/httpAuth/app/rest/buildTypes/id:bt2" projectName="Common" projectId="project2" webUrl="http://YOURSERVER/viewType.html?buildTypeId=bt2"/>
<startDate>20100923T082041+0200</startDate>
<finishDate>20100923T082320+0200</finishDate>
<agent name="buildagent" id="3" href="/httpAuth/app/rest/agents/id:3"/>
<tags/>
<properties>
    <property name="env.SvnSubDirectory" value="trunk"/>
</properties>
<revisions>
    <revision display-version="9335">
        <vcs-root href="/httpAuth/app/rest/vcs-roots/id:1,ver:1" name="Common"/>
    </revision>
</revisions>
<changes href="/httpAuth/app/rest/changes?build=id:4271" count="1"/>
<relatedIssues/>

Have a look at the Rest API from TeamCity

You can load a list of all builds:

http://YOURSERVER/httpAuth/app/rest/builds

The result ist something like this:

<builds nextHref="/httpAuth/app/rest/builds?count=100&start=100" count="100">
   <build id="4324" number="273" status="SUCCESS" buildTypeId="bt9" href="/httpAuth/app/rest/builds/id:4324" webUrl="http://YOURSERVER/viewLog.html?buildId=4324&buildTypeId=bt9"/>
   <build id="4323" number="283" status="ERROR" buildTypeId="bt10" href="/httpAuth/app/rest/builds/id:4323" webUrl="http://YOURSERVER/viewLog.html?buildId=4323&buildTypeId=bt10"/>
   <build id="4322" number="56" status="SUCCESS" buildTypeId="bt44" href="/httpAuth/app/rest/builds/id:4322" webUrl="http://YOURSERVER/viewLog.html?buildId=4322&buildTypeId=bt44"/>
</builds>

By look at the href you can get detailed Info for this Build. And there is an attribute pinned

The count and the start position of the list of build can you control by adding GET Parameters like this: ?count=5&start=200

If you want it for specific Projects or Project Configuratins you have to go this way:

With this API you can retrieve all Projects.
(use http://YOURSERVER/httpAuth/app/rest/projects)

With this info you can get the Configurations.
(example: http://YOURSERVER/httpAuth/app/rest/projects/id:project3)

Here you get the detail info about a specific configuration:
(example: http://YOURSERVER/httpAuth/app/rest/buildTypes/id:bt17

And finally with this list you can get details of this build:
(example: http://YOURSERVER/httpAuth/app/rest/builds/id:4144

The result of the last call is something like this:

<build id="4271" number="151" status="SUCCESS" href="/httpAuth/app/rest/builds/id:4271" webUrl="http://YOURSERVER/viewLog.html?buildId=4271&buildTypeId=bt2" personal="false" history="false" pinned="false">
<statusText>Tests passed: 177</statusText>
<buildType id="bt2" name="trunk Legacy" href="/httpAuth/app/rest/buildTypes/id:bt2" projectName="Common" projectId="project2" webUrl="http://YOURSERVER/viewType.html?buildTypeId=bt2"/>
<startDate>20100923T082041+0200</startDate>
<finishDate>20100923T082320+0200</finishDate>
<agent name="buildagent" id="3" href="/httpAuth/app/rest/agents/id:3"/>
<tags/>
<properties>
    <property name="env.SvnSubDirectory" value="trunk"/>
</properties>
<revisions>
    <revision display-version="9335">
        <vcs-root href="/httpAuth/app/rest/vcs-roots/id:1,ver:1" name="Common"/>
    </revision>
</revisions>
<changes href="/httpAuth/app/rest/changes?build=id:4271" count="1"/>
<relatedIssues/>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文