Retrieving build related data from teamcity

We are using teamcity in our company. We change the build status by putting in custom statements like
##teamcity[buildStatus status='<status value>' text='{build.status.text} and some aftertext']

What I'm interested in is to retrieve these values in a later build.

eg.

build1 buildstatus="100 suites 15 failed"
build2 buildstatus="105 suites 17 failed"
build3 buildstatus="110 suites 12 failed"
build4 buildstatus="120 suites 10 failed"


In a different configuration i need to get a list of all the builds and the buildstatus for each of them. Along with this i may also need other data that i have outputted like
##teamcity[buildStatisticValue key='findbugs-total' value='230']

Can someone tell me how i can do this?

0
5 comments

Hi

Build status can be obtained by REST API.

Ability to obtain statistics will be added to the plugin in next version TeamCity 6.5.
You can preview it a current EAP build.

Michael

0
Avatar
Permanently deleted user

Hi, using the REST API in Teamcity 6.5 I can see a lot of the built-in statistics, but a custom statistic that I'm publishing during the build is not showing up. Shouldn't I see this via REST?  I did see http://youtrack.jetbrains.net/issue/TW-4003, but I can't tell if that's a related issue or not. Thanks.



-Ed
0

Hi

Sorry for late response.

Yes, the custom properties should be published too.
Is this problem reproduced continuously?
Can you see the data on charts?

Thanks

0
Avatar
Permanently deleted user

Hi,

Has this issue been sorted out?

I am interested in upgrading to 6.5 or 7.0 (currently on 6.0), and I am interested in the ability to query for custom statistics via the REST API.

Should this be working?  Specifically, if I set a custom statistic using "##teamcity[buildStatisticValue..." can I later read those statistics about ther build via the REST API?

Thanks,
Andrew.

0
Avatar
Permanently deleted user

I just ran some tests with TC7 and I did get statistics to show up via the
REST api, but I had to define a chart for each stat (as Michael was
implying in his message). Without the charts the stats do not show up.

-Ed

0

Please sign in to leave a comment.