I'm currently in the process of configuring StatSVN to run in TeamCity and am running into a bit of a problem I need some ideas on. Firstly, StatSVN needs to run against a working directory that has been checked out from SVN, it can't run against the copy of the app that TeamCity exports from SVN. As such, it needs to perform an svn checkout on the build server.
What I've done is created a bat file which runs the three command required by StatSVN to create the report, the first of which is the checkout:
svn checkout [repository path]
Now, correct me if I'm wrong, but this should checkout using the current identity. Certainly it runs fine directly from the command line. When it runs in TeamCity, the build runner is configured to run under a service accout which has identical rights to me in SVN. In fact the same service account is used to create repositories and default directory structures so I've no doubt it has the rights.
However, every time the build runs it hangs and after stopping it, it's obvious why:
[13:38:28]: C:\TeamCity\buildAgent\work\e8d4dc4070ecf602>svn checkout [repository path]
[13:38:29]: Authentication realm: <[svn server]> Subversion Repositories
[13:38:38]: Password for '[service account]':
[13:38:38]: Process exited with code 1
It appears to be hanging and waiting for a password which it obviously can't get whilst running unattended. Does anyone have any ideas on why this is happening?
Update: The next command required by StatSVN is an "svn log" which dumps the commit history. Even if you can tackle the issue of svn checkout by configuring the TeamCity VCS checkout mode to "Automatically on agent" hence resulting in an actual checkout rather than an export (this is certainly preferable to a manual command), the "svn log" command still presents the same problem.