Where is the build script and or the teamcity-info.xml

Answered

Hello I'm trying to locate the build script or the teamcity-info.xml file which is mentioned in the guide about using custom metrics for the "Statistics" tab in TeamCity but I'm unsure as to where these are? Are they on the server that hosts TC or can I find them in the UI somewhere?

0
1 comment

Hello Nick,

This is a copy of my response in Zendesk on the relevant thread.

The teamcity-info.xml file is an obsolete approach to providing metadata from the build context; idea was that you could publish this file with the build artifacts, and TeamCity would parse it to gather some data once the build is over. It is deprecated in favor of service messages feature which instead revolves around printing messages to stdout in a specific format. 

If you aim to publish statistic values during build, so you could check a chart based on the statistics values later on in Statistics tab; for that, this approach would be suitable. You can, for instance, have a custom command-line step with the following code:

echo ##teamcity[buildStatisticValue key='myStatValue' value='999.99']

As a result, when this command is issued, TeamCity will parse out the statistic value and add new entry myStatValue equal to 999.99. You may report multiple keys; overriding built-in keys is not allowed.
If you have any other process where you could control the stdout output, you may print out the above message there just as well; as long it is in the required format and is on the stdout, TeamCity will parse it.

1

Please sign in to leave a comment.