different buildtype id is returned in teamcity.buildType.id system property

when you create a new build config (using tc 8.0.3), Build configuration ID is filled by teamcity based on project name and buildconf name. Something like "ProjectName_SubProjectName_BuildConfName".

After running a build, I can see it in the history log (build parameters tab) that the build was ran with the correct value, ie: system.teamcity.buildType.id is "ProjectName_SubProjectName_BuildConfName".
However, I am using a NAnt runner and I want to access this property from my NAnt script. I reverse engineered a bit how the NAnt runner works and I see that several system properties are injected into the NAnt's property dictionary, with the 'system' removed.

The problem is that this injected value is 'bt4' and not the correct "ProjectName_SubProjectName_BuildConfName". With this I cannot access the rest api from the build script because the buildtype is incorrect. If I reset my build configuration and overwrite the generated buildtype id to read as 'bt4' everything works as expected, but still, this seems to be a problem for me. I don't want to figure out the internal buildType id everytime.

3 comments
Comment actions Permalink

Note that I can workaround this by defining a system property on the build configuration like system.tc.buildType.id with the value %system.teamcity.buildType.id% and then my NAnt script will have the correct value in ${tc.buildType.id}

0
Comment actions Permalink

This looks like a bug. Could you please submit bug report in our tracker: http://youtrack.jetbrains.com/issues/TW?

0

Please sign in to leave a comment.