%teamcity.agent.name% in Perforce VCS root

Hello,I have been using TeamCity for awhile and historically have setup a single VCS root using a client mapping for a project and let TeamCity handle everything else, but have noticed a few things that don't seem to work for us. Under this current setup, if the VCS root changes, it re-syncs everything to a new cache directory instead of simply updating the client mapping. This can get very costly with 3-4 branches of 80+ GB across 40 build machines. Meaning if the root changes, I have to manually maintain the disc space on all 40 machines.Because of this I have been doing some testing and have a step (with no VCS root attached) that will generate a Perforce client based on the %teamcity.agent.name%. This works great, except I cannot see a way to setup a VCS root and have it use the generated client spec, so no builds are kicked off.How can I pass the %teamcity.agent.name% as the client in the VCS root? Or is it possible to have TeamCity create the client where I specify the name and it does not use the hash directoryBasically I want to:* Generate my own client spec based on a template client spec in Perforce (that contains all branches)* Setup a project that uses my generated client spec, but only syncs the path for the project it is bulding.Cheers
1 comment
Comment actions Permalink

Hello Steve,

i'm affraid, you can't pass the %teamcity.agent.name% as the client in the VCS root. When TeamCity checks for changes and perform checkouts it does'nt know about the agent yet.
I'd ask you, why do you want to change regullarly VCS root, what is your usecase?

regards

Zdenek

0

Please sign in to leave a comment.