Teamcity 6: Perforce server settings per agent

I have not yet checked if TeamCity 6 has got it but my question relates to the new agent side checked for perforce that is in ver 6.

In a distributed system there will be a main Perforce server and several proxys.

I would want an agent to have a local parameter that will point to the closest Perforce proxy since I will have agent in geographically different locations.

Is this in ver 6 ?


Hello Morne,

  Please clarify how this parameter should be set. TeamCity uses native p4 client to obtain files, so if you can specify proxy via some environment variable, this may be possible.



A environmental variable would be good. (or a system property)

The agent's files can then have a line:


and the VCS root configurations can then use %P4_PROXY%



  The problem is, we cannot use any variables in VCS root specification (there is a highly voted request for this feature).

   My question was if it is possible to specify P4 proxy in environment only, i.e. implicitly, on the build agent machine.

   If the answer is "no", than I don't see other way to specify proxies than using multiple VCS roots with different settings for different build agents.

   May be, we could introduce a separate field in VCS settings for P4 proxy, but still, it would require support of variables in VCS roots.

  Sorry :(



Implicit setting will work.

If I can set the P4_PORT variable on each agent and get Teamcity to use this when synching on an agent , would this work ?

All I would need is a tickbox " Use local P4_PORT setting" i can enable or something similar.

I assume TeamCity set the P4_PORT anyway as part of the p4.exe command line and since p4 will use the  global P4_PORT variable if it is not specified as part of a command this will work perfectly if this is possible for a local sync.



   I think we could handle this. We can add a flag "Use Perforce proxy from P4PORT" in the VCS settings.
   I've filed corresponding issue in our tracker:

   Please read and vote/comment on it.

   Thanks for the suggestion!


Please sign in to leave a comment.