Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I copy the artifacts from Teamcity to another server?

Tags:

how can I copy the artifacts from Teamcity to another server? Thanks

like image 577
Raul Avatar asked Mar 30 '10 13:03

Raul


2 Answers

The way I have done this, make things a lot easier.. Setup another configuration that pulls in, via artifact dependencies, all the files you need then run a cmd script to xcopy/copy the files to another drive on the network. You can do this using cmd script, vbs, python, shell etc..

  • Remember, you only need to refer to directories as if they were local as you would have your script in the same working directory

i.e cmd script :: xcopy .\"my build artifact(s)" \path\to\drive\on\my\network\"my build artifacts"

It doesn't get easier than that.

Naturally, if your artifacts are huge, then you may want to consider your more complicated option. However, TeamCity currently have a ticket pending, which you can vote on, that allows you to run multiple runners in one configuration - so you could just add your cmd script to the same configuration to save the copy time; please vote if can spare a minute:

http://youtrack.jetbrains.net/issue/TW-3660

like image 83
user304133 Avatar answered Sep 28 '22 07:09

user304133


There is a Deployer plugin, that supports deploy by fileshare/SMB, FTP, SSH and other means. The usage is basically the same as the Artifact paths.

We have used just samba, so you must enter:

  • target Host path: //server/drive/myfolder
  • Username: mydomain\myusername - in our case we had to write domain here too
  • Password: ****
  • Domain: mydomain

and in path just select the files as in artifacts:

product/* => product.zip

and it will create file //server/drive/myfolder/product.zip

like image 42
ne2dmar Avatar answered Sep 28 '22 08:09

ne2dmar