尋找獲取固定構建的xml源。我發現我可以過濾成功/失敗的構建,但找不到通過固定過濾的標誌/選項。有什麼建議麼?如何從teamcity 5.1的固定版本獲取xml提要?
2
A
回答
3
有從TeamCity
看看REST API的所有版本,則可以加載列表:
http://YOURSERVER/httpAuth/app/rest/builds
結果IST是這樣的:
<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
如果你想爲你必須去特定的項目或項目Configuratins這樣:
有了這個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/>
0
不是你問什麼,但我發現這個問題尋找一個類似的事情爲版本9時:
在TeamCity的9,你可以很容易地只訪問
https://teamcity.YOURCOMPANY.com/app/rest/builds?locator=pinned:true
文檔: https://confluence.jetbrains.com/display/TCD9/REST+API#RESTAPI-BuildLocator
相關問題
- 1. TeamCity:從VCS獲取版本
- 2. SimpleXML從XML獲取固件版本
- 3. 如何從nuspec中提取一個版本號到TeamCity中?
- 4. 獲取Xml版本
- 5. 的Git版本號從TeamCity的8.1中特定分支提交
- 6. TeamCity REST API如何獲取並非歷史版本的構建
- 7. 如何使用TeamCity REST API獲取隊列中的版本
- 8. 如何使用TeamCity REST API獲取觸發版本的buildId?
- 9. Git-如何在TeamCity中籤出特定版本(提交哈希)?
- 10. 如何從Python中的RSS提要獲取XML屬性和值?
- 11. 如何從xml中獲取xml文本?
- 12. 如何以xml格式爲ruby腳本獲取RSS提要
- 13. 如何從php獲取mongodb的版本
- 14. 如何從VSIX獲取SSMS的版本
- 15. 在C#中提取從版本主要版本
- 16. SDK版本固定
- 17. 如何在XML文檔中提取HTML的文本版本?
- 18. 如何以編程方式獲取Android的固件版本?
- 19. 如何獲取手機中安裝的android固件版本?
- 20. Android如何從.aspx feed獲取提要?
- 21. 如何從gridview中獲取標題文本而不固定列
- 22. 如何分別獲取特定版本?
- 23. 如何從ASP獲取.NET .dll版本
- 24. 如何從System.Web.HttpRequest獲取協議版本?
- 25. 如何從.NET獲取Windows版本號?
- 26. 如何從emacs獲取windows版本
- 27. 如何從gemspec文件獲取版本?
- 28. 如何從SharpSVN獲取SVN版本?
- 29. 如何從代碼獲取Flutter版本?
- 30. 需要獲取已發佈版本的組件的XML