Bruno Shine
Bruno Shine

Reputation: 1031

Team City and MSBuild: copy files to another computer why dosen't it work?

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

Upvotes: 1

Views: 2779

Answers (1)

OregonGhost
OregonGhost

Reputation: 23759

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).

Upvotes: 1

Related Questions