It's all about the answers!

Ask a question

Monitoring builds and adding a build light

Colin Thorne (22421619) | asked Nov 17 '10, 10:05 a.m.
I would like to add a (real) build light that shows the current state of the build (red or green). I have done this before using other continuous integration tools but this is the first time I have tried it with RTC.

Can anyone recommend a way of getting the current state of a given build definition from outside RTC? I would like to know whether there is a build in progress, and also whether the previous build was successful or failed.

I have had a quick look at the feeds url for a build definition but for some reason not all the build events are available from the external feed. There are some events (including the important Status:Failed, State: Completed) not appearing when I look at the feed from a browser, although they appear inside RTC.

We are using RTC

Any help would be appreciated. Thanks, Colin.

One answer

permanent link
Nick Edgar (6.5k711) | answered Nov 23 '10, 5:33 p.m.
Hi Colin,

Sorry for the delay, I must have missed this post when scanning the forums last week.

Using the build feeds would be a good approach (note that you can create a feed for each build definition). Each event should carry the state and status, as well as the build label, build definition id, and whether it was a personal build (you might want to filter these out).
e.g. the feed for the build,


When you see the status and/or state missing, are you looking at the HTML rendering of the feed or the original XML? They should be on every entry.

Another approach is to use the internal REST interface that services the web UI.
comes back in JSON format, and has:

{"buildDefinition":{... "id":"rtc.integration", ...}, "lastCompletedBuildStatus":"ERROR", ...}

The 'lastCompletedBuildStatus shows the status of the last completed build, excluding personal builds.

I think the latter approach may be more complicated for authentication though, if your server is configured for form-based authentication. I believe the feeds always use HTTP auth, which is simpler.

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.