TeamCity 4.0 Help

Enabling the Status Widget for Build Configurations

By enabling the status widget, it is possible for any external web page to retrieve the latest build status of one or more build configurations.

You can enable status widget in the 1.General Settings section of the General Settings page when creating/editing build configuration:

Enable status widget

In addition to enabling this option through web UI, you have to include the following snippets of code in the web page source:

  • Add this code sample in the <head> section (or alternatively, add the withCss=true parameter to externalStatus.html): <style type="text/css"> @import" <TeamCity_server_URL>/css/status/externalStatus.css"; </style>

  • Insert this code sample where you want to display the build configuration's status: <script type="text/javascript" src="<TeamCity_server_URL>/externalStatus.html?js=1"> </script>

  • If you prefer to use plain HTML instead of javascript, omit the js=1 parameter

  • If you want to include default CSS styles without modifying the <head> section, add the withCss=true parameter

To provide up-to-date status information on specific build configurations, use the following parameter in the URL as many times as needed:

&buildTypeId=<buildConfigurationId>

It is also possible to show the status of all a project's build configurations by replacing "&buildTypeId=<buildConfigurationId>" with "&projectId=<projectId>". You can select a combination of these parameters to display the needed projects and build configurations on your web page.

You can also download and customize the externalStatus.css file (for example, you can disable some columns by using display: none; See comments in externalStatus.css). But in this case, you must not include the withCss=true parameter, but provide the CSS styles explicitly, preferably in the <head> section, instead.

Enabling the status widget also allows non-logged in users to get RSS feed for the build configuration.

Last modified: 20 April 2023