Search code examples
teamcityperforceteamcity-9.0perforce-client-spec

Perforce VCS root agent side checkout mapping on Teamcity


When I do a Perforce vcs root checkout on teamcity agent, I see that a workspace which starts with "TC_p4_" gets created but I cannot find this folder on my agent. Where is the mapping of this "TC_p4_" being done in Teamcity? I do not have any checkout rules enabled for the vcs root in teamcity.

My vcsroot client mapping settings look as follows in teamcity:
//vcsroot/stream_name/... //team-city-agent/...

Also when I do a checkout, revert or submit on the Perforce stream used in vcs root using p4 command line commands like p4 sync, p4 revert etc , I keep getting the following error in Teamcity.

warning: cannot submit from non-stream client

Can someone please help me with what I'm missing here. Appreciate any kind of pointers and help through your responses!


Solution

  • Start by looking at the details of the client. You don't need to do this on the TC agent - any box connecting to your P4 server will do. You options are:

    1. in P4V, press Ctrl-G > choose Workspace > enter the TC_p4_... name.
    2. in p4 the cmdline client, run p4 client -o TC_p4_....

    Either of these will show you the "Root" of the workspace (as well as the "Host", which should be your TC agent's hostname). That will give you a hint where to look on the agent.

    Now, I suspect you can't sync, revert, etc. because when you run these commands, your environment is not set up properly. Instead of p4 sync and similar, try running p4 set. Does it correctly identify the server (P4PORT) and the client (TC_p4_...)? If not, you'll have to fix this first, which can be done a number of ways.