TeamCity build status icon
With the upcoming version of TeamCity 7.1, it is now easier to get status updates on a build, by using TeamCity’s HTTP API . We have had this functionality in the past, however it hasn’t been straightforward to use and not the most ideal solution for things like markup pages.
With 7.1, which is currently in EAP we have simplified this. The following single line of code:
produces the status icon for the “rest-clients” project:
The only thing you need to know about the project is the build configuration ID, which is always accessible in the URL address bar
If a build is not successful, you’ll see: or
The code required is:
Don’t forget to add the “guest=1” parameters to the URL so that people clicking on the link will be taken directly to the build page. Otherwise they’ll be welcomed with a login screen. See it in action on GitHub. For more details about the options available, see the documentation page.
Happy green builds!
Subscribe to Blog updates
Thanks, we've got you!
Kotlin DSL for Beginners: Recommended Refactorings
Imagine you have just switched your TeamCity project over to Kotlin DSL. Your builds run successfully, but what next? What small refactorings can you apply to your Kotlin DSL code to help keep it clean and tidy? In this article, we'll discuss the next steps you can take. 1. Remove disabled build st…
TeamCity integration with .NET, Part 3: Deploying projects
Today we are wrapping up our .NET integration demo. In this series, we've been explaining how TeamCity can integrate with .NET and walking you through a tutorial. To catch up with the demo, read the previous posts: Part 1: New approach and demo Part 2: Testing and building projects This project ha…
New TeamCity REST API documentation
TeamCity REST API is a powerful tool which lets you integrate external applications with the TeamCity server and create diverse script interactions. To make this instrument more useful and easier to understand, we have reworked the REST API documentation. Compared to a general guide we had in the p…
TeamCity integration with .NET, Part 2: Testing and building projects
In this blog series, we talk about the new approach we use to integrate TeamCity with .NET. Part 1 describes the .NET runner, that covers most of the core integration functionality, and introduces a demo project. In Part 2, we will dig deeper into the demo project and explore its Test and Build conf…