views:

979

answers:

2

Hi all, I'm using TeamCity 4 to do CI with MSBuild. My problem is that when I try to copy file to the QA server, the msbuild fails, but if I change the script to copy locally it work. I've tried mapping the remote share as a local drive and still it doesn't seems to work.

This is my task on MSBuild:

<Exec Command="$(BATCH_PATH)deploy_DEV.bat $(DEPLOY_PATH)" />

This is the content of the batch file:

"C:\Program Files\Windows Resource Kits\Tools\robocopy" %1 \\RemoteServer\SharedDirectory\ /MIR

Any thoughts?

Thanks

+1  A: 

Is the build running on the system account? If so, network shares might be not available or not authenticated. You can either run the build agent on a local user account (not recommended) or make somehow sure that the shares are available to the system account. What is the output of the robocopy call?

You can also try to replace your batch file with the artifact system from TeamCity. Just add the appropriate artifact paths to make the build result available to TeamCity, and then there should be an option to copy the artifacts to another system (not sure about that though).

OregonGhost
As far as I know, team city doesn't have support to copy artifacts. Robocopy exits with code 16.
Bruno Shine
A: 

Hi Bruno, Did you succeed to copy artefacts to another machine? If yes, please tell me how you did it. Thanks, Raul

Raul