This Question is Answered

1 "helpful" answer available (2 pts)
9 Replies Last post: Jul 9, 2009 5:40 PM by Will Wilson  
Will Wilson Newbie 8 posts since
Jun 29, 2009
Currently Being Moderated

Jul 8, 2009 7:07 PM

Missing agent properties

I'm in the process of upgrading my TeamCity install from 4.0.1 to 4.5.3. The upgrade process described in the documentation was followed (my install is on Windows 2003 via MSI files).

 

Our builds are scripted with FinalBuilder 6, and run from TeamCity via the command line runner.

 

On TeamCity 4.0.1 all the properties (agent, build configuration, predefined, etc.) were available to the finalbuilder script. Specifically, we read teamcity.dotnet.nunitlauncher to determine the path to the nunitlauncher on a particular build agent.

 

On TeamCity 4.5.3 none (or very few) of the properties are available. FinalBuilder reports that the propertie do not exist. The environment variable TEAMCITY_BUILD_PROPERTIES_FILE does exist, and it points to a file (in the case of this particular build) C:\BuildAgent\temp\agentTmp\teamcity.build12122.properties, which in turn contains the properties I'm looking for - for example teamcity.dotnet.nunitlauncher.

 

My question is why are these properties no longer available in the environment, as they were in TeamCity 4.0.1?

 

Thanks for any help,

 

W.

Pavel Sher JetBrains 2,359 posts since
Mar 6, 2008
Currently Being Moderated
Jul 8, 2009 8:03 PM in response to: Will Wilson
Re: Missing agent properties

I guess you mean environment variable "teamcity.dotnet.nunitlauncher". Starting with 4.5.x TeamCity will not set such variables anymore because not all software likes dots in the environment variable names. There exists property with such name but if you are starting FinalBuilder build via the command line runner then properties are not available for you (properties make sens for some runners only: MSBuild, NAnt, Solution runners as well as for Java based runners like Ant).

 

However it is simple to restore such environment variable in your case. For this you should add environment variable on the 6th step of the build conf administration screens with name

teamcity.dotnet.nunitlauncher  and value %system.teamcity.dotnet.nunitlauncher%

 

Value %system.teamcity.dotnet.nunitlauncher% is a reference to property teamcity.dotnet.nunitlauncher and will be replaced when build starts.

Pavel Sher JetBrains 2,359 posts since
Mar 6, 2008
Currently Being Moderated
Jul 9, 2009 5:13 PM in response to: Will Wilson
Re: Missing agent properties

How do you start your Final builder script? What runner do you use in TeamCity? Could you please attach screenshot of the 6th step of your build configuration?

Pavel Sher JetBrains 2,359 posts since
Mar 6, 2008
Currently Being Moderated
Jul 9, 2009 5:30 PM in response to: Will Wilson
Re: Missing agent properties

You added property teamcity.dotnet.nunitlauncher but as I told before command line runner does not support properties. Properties are not applicable to command line tools. You should add environment variable with name: teamcity.dotnet.nunitlauncher and value %system.teamcity.dotnet.nunitlauncher%

Pavel Sher JetBrains 2,359 posts since
Mar 6, 2008
Currently Being Moderated
Jul 9, 2009 5:37 PM in response to: Will Wilson
Re: Missing agent properties

Yes, this file will be available in the future versions. You can parse it if you wish, but suggested workaround with manually added env variable can be simpler.

More Like This

  • Retrieving data ...