How to link to latest build on Visual Studio Team Services

亡梦爱人 提交于 2020-01-15 01:48:47

问题


Latest Team Foundation Server and Visual Studio Team Services can generate a build status badge.

BTW, I don't find how can I link it to a public build details of latest build (or even other past builds).

For example, my build status badge is this one:

For example, I've another old project hosted on GitHub and it has CI with Travis, and I both have a build badge and a build summary: https://travis-ci.org/mfidemraizer/joopl/builds

I'm just asking for getting this summary on Visual Studio Team Services.


回答1:


There is no way to do this, the Build Badge only provide an image to show the build status for now.

There are several feature requests submitted on VSTS User Voice, you can vote them:

When clicking a badge, it should direct me to my visual studio build history instead of just directing me to an image

Expose more granular, better badges. (With test results)




回答2:


It would be possible to create an extension that reaches into the latest build details. For example, you could create a build task that posts the details somewhere.




回答3:


Update for 2019: I don't know when this was added, but there is now a formatted markdown link available that will click through to the latest build. You can use it anywhere that supports markdown syntax (Project welcome pages, repository README files, dashboard widgets, comments, etc.).

It uses the format:

[![Build status](<project url>/_apis/build/status/<build name>)](<project url>/_build/latest?definitionId=<build id>)

You can find it at the bottom of the Options tab in your pipeline build definition.



来源:https://stackoverflow.com/questions/39039008/how-to-link-to-latest-build-on-visual-studio-team-services

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!