Trouble with custom charts and teamcity-info.xml

Hi all,

I am having a little bit of trouble with my custom chart. I wanted to create a custom chart for the project on the project's statistics tab. The project's name is Temporary and I am working on my local machine. My TEAMCITY_DATA_PATH equals"C:\ProgramData\JetBrains\TeamCity" and TeamCity was installed to C:/TeamCity. This is what I put in plugin-settings.xml:

 <custom-graphs>
      <graph title="Custom data"  seriesTitle="Default">
            <valueType key="key1" title="Metric1" buildTypeId="bt2" />
      </graph>
 </custom-graphs>

plugin-settings.xml is located here: C:\ProgramData\JetBrains\TeamCity\config\Temporary

I created the file teamcity-info.xml and placed this inside:

<build>
    <statisticValue key="key1" value="1" />
</build>

teamcity-info.xml is located here: C:\ProgramData\JetBrains\TeamCity\config

The chart appears in the correct spot, the statistics tab for the project. However, there is no value on the graph like the teamcity-info.xml file specifies. I didn't know if I created the file incorrectly or if the file was in the wrong place so I tried deleting the end tag and reloading the page. Nothing came up error wise so I knew that at the very least, my teamcity-info.xml file was in the wrong place (although it may be written incorrectly as well, I'm not sure).

My question now is does anyone know where I am supposed to place the teamcity-info.xml file? (or if it is placed in the correct spot, why it is not working?) and is what I have in teamcity-info.xml correct?

Thanks,
Jason

4 comments
Comment actions Permalink
Hi Jason    You need to send teamcity the values for the chart in the build (bt2) and print it in the log as such:  ##teamcity[buildStatisticValue key='key1' value='61.36']     then teamcity will pick the value up and show it in the chart after every build is executed. you dont need the info.xml file. cheers
0
Comment actions Permalink

Awesome! Thanks for the response! Is it possible to have two values for a point doing it this way (x and y coordinate to be specific) or am I limited to the Y-axis?

0
Comment actions Permalink

in each build report 2  keys: xaxis and yaxis and their values.

0
Comment actions Permalink

Buddy I am not sure about the solution but recently I have also gone through the same problem and then KoolChart helps me and sort out problem. So would like you to visit free charts which will definitely work for you.

0

Please sign in to leave a comment.