Statistics from teamcity-info.xml (generated in a command line build step) is not imported...

With TeamCity Enterprise 7.0, I've made a Command Line Custom script buildstep that should allow me to get create statistics about the footprint of the current build.

The teamcity-info.xml is correctly generated, but the statistics never actually is updated with the data I provide.


To recreate:

Runner Type: Command Line

Step Name: Generate footprint statistics

Working Directory:

Run: Custom script

Custom script:

@ECHO off

setlocal enableextensions enabledelayedexpansion

call :Header

set file="EB_Debug.bin"

IF EXIST %%file%% (

call :GetSize %%file%%

) ELSE (

set file="EB_Release.bin"

IF EXIST %%file%% (

call :GetSize %%file%%

) ELSE (

set file="Target_Release.bin"

IF EXIST %%file%% (

call :GetSize %%file%%

) ELSE (

set file="Target_Debug.bin"

IF EXIST %%file%% (

call :GetSize %%file%%

))))

call :Footer

GOTO :END

:: ------- Subrutines --------------

:Header

echo Generating teamcity-info.xml:

echo ^<build^>

echo ^<build^> >teamcity-info.xml

GOTO :EOF

:GetSize

:: Note: %~z1 only works inside this subrutine.

echo  ^<statisticValue key="Footprint (bytes)" value="%~z1"/^>

echo  ^<statisticValue key="Footprint (bytes)" value="%~z1"/^>  >>teamcity-info.xml

GOTO :EOF

:Footer

echo ^</build^>

echo ^</build^> >>teamcity-info.xml

GOTO :EOF

:END


This propperly generates an teamcity-info.xml file in the checkout directory, containing the following data:

<build>

<statisticValue key="Footprint (bytes)" value="276076"/>

</build>


However I find no indication that Teamcity attempts to import the data, and if I look at the builds statistics tab, there's no change to the output.

So what's wrong in what I'm doing?

1 comment
Comment actions Permalink

Update: The teamcity-info.xml is beeing discovered by teamcity, as it's now part of the build artifacts. But the statics graphs still does not reflect the data in the file.

0

Please sign in to leave a comment.