Accessing P4CLIENT if sync is turned off


I have a build with a single Perforce VCS root attached. I set VCS checkout mode to "Do not checkout files automatically". I would like to run "p4 -Zproxyload sync //..." against the client in one of the build steps, but it seems like this variable is not set, so the command fails with this message:

Client 'machinename' unknown - use 'client' command to create it.

I tried using a checkout rule "-:.", but it still did not work. How can I make it work?


Comment actions Permalink

Hi Oleg,

The workspace is created and P4CLIENT is initialized only when checkout is performed. So in case of the checkout rule "-:." P4CLIENT will be empty.
If you do not want to checkout any files and want  to use p4 command in your scripts, then you should manually create workspace and specify needed environment variables, as you perform it without TeamCity.

Comment actions Permalink

Thanks, Alina. That's what I ended up doing.


Please sign in to leave a comment.