TFS Build V.Next supports build badges that you can easily embed into your web packages to display the status of your latest build.
The one badge that comes out of the box is the build status, for example .
It would be nice if there would be additional information, for example for code coverage, the time a build finished, or the latest build ID it has.
TFS is not extensible in this regard, but what is doable, is to write a standalone service that can produce such badges, but gathers the necessary information by connecting itself to TFS (or VSTS) using the REST API to get the necessary information.
I created such a service using ASP.NET Core 2.0. It is available here, including further information on how to set it up, or generate badges.
Here are some example badges you can get with this service:
Type | Sample |
---|---|
buildnumber | |
duration | |
finishdate | |
coverage | |
best-coverage | |
custom |