Environment variable not getting picked up


I defined my username and password as env variable but they dont get picked up during the build. If i re define them as system variable, they get picked up.

I can understand the reason here. Can someone please provide information regarding the issue

Also i have like 60 svn tags which i have currently defined as system variable so that my build can pick them. I tried using a parameter file where i can define the tags and build fetches them directly from the file but the file is not getting read. Can someone help with this also?


Prakhar kaushik

Comment actions Permalink

For the first question - please provide an example, how is the variable referenced in your build script, and what results you get.

Comment actions Permalink

For the second question.

Not sure I understand the goal. Do you want to checkout all these tags in a single build?

Comment actions Permalink

For the first part:

if i declare the variable as

"variable name:system.svn.repository.user    variable value :svc-liqsvn    Kind:system property" in the build parameters section.

This is how i use it in the ant build files:

<echo>user name :"${svn.repository.user}"</echo>

the ouput echoes the correct values i.e svc-liqsvn   

But i declare the variable as environment variable as shown

"variable name:system.svn.repository.user    variable value :svc-liqsvn    Kind:Environment Variable"

The build file doesnt pick up and it echoes ${svn.repository.user} and ${svn.repository.passwd}

For the second part:

Please see the attached file which has the list of system parameter defined in the build parameters section.

Instead of defining it in this way, if i declare them in buildAgent.properties or any other parameter file which i  use for passing variable to build files, they arent picked up by the build.Basicaly the build does use the buildAgent.properties located at "C:\Teamcity\buildAgent\conf" when i installed the software in c:\Teamcity.

Can you please help me with the above problems?

Comment actions Permalink

I am encountering a similar problem when trying to set an environment variable to hold the url of a TFS repository.

In the buildAgent.properties configuration file I have set an entry like:


This shows up correctly in the list of Agent Parameters as:

system.TFS.Url     http://MyServerName:8080/tfs/learning%20services

In my VCS Root, in the TFS Settings panel, field for URL - I can select this parameter from the presented list of available parameters.

However when I Test the Connection, it fails and gives me an error message saying

Test connection failed in QDE :: DEV. TFS failed. ExitCode: 1


. (other stuff)


Connection test:

It appears as if the parameter value is not being resolved prior to the connection action against the server.

If I setup the same value exactly in the Project Parameters, then it does work.

I would really like to be able to set this once for the whole installation as we only have the one TFS repository and there will be many projects.

Is there some other way of referring to this parameter?


Please sign in to leave a comment.