Is the ability to checkout to an agent available using Perforce available in TeamCity 3.0? Based on a Jira issue that I filed 10 months ago (TW-2103) it appears that it is not. This is becoming increasingly a problem that I must work around both on Linux & Windows build agents.
My workaround for this is:
1) Write a teamcity-build.xml that:
a) Does a forced Perforce sync before every build
b) Write ant targets to run the actual build that use the build.xml for each project.
2) In TeamCity, set VCS checkout mode to Do not checkout files automatically.
This is becoming cumbersome and difficult to maintain. I would prefer to simply setup TeamCity to use the project build.xml and have TeamCity checkout the source code.
The reason that this must be done is because the file permissions on a Linux build agent are incorrect when the build is set to Automatically checkout on the server. In particular, the executable bit is not set for executables. But, I am seeing odd behavior even on a Windows agent the first time I run a build. Rather than using the mapping specified in the build's client spec, it uses the build config's "build working directory" as the workspace root to checkout. If I manually run "p4 -c <client-spec> sync -f" on the build agent, then it seems to work after that.
But, I'm actually not certain that TeamCity's automated checkout is working properly with Perforce. I suspect that by manually doing a forced sync on the build agent, the files are read-only and are not over-written (clobbered) by new files when TeamCity's automatic server checkout happens. I had seen some evidence of this problem in the past (TW-2419). Despite TeamCity logging being set to debug, there is no evidence that checkouts are successful or not either in the TeamCity UI or in the agent logs.
Has Perforce checkout behavior changed in TeamCity 3.0?