we have the source control (subversion) on a server (at a client site) that can only be accessed through vpn connection. I have a batch file available to open the vpn connection and to signout/terminate vpn connection. I can't access the build server (virtual machine) when the vpn connection is active because of the vpn settings and i dont have any control over the vpn. so, if we run the vpn connection all the time, then we can't access the teamcity site or login to the build server, unless we walk over to the server room and access the host server manually to login to the build server and kill the vpn connection.
So, ideally, i want the buildagent to run a command (batch file) to open the vpn connection before it connects to subversion, then go through usual steps, like checking source control for changes, build, label, etc, and then after it's done, to terminate the vpn connection.
Is there a way to accomplish this?