best way to move/deploy assemblies?

I've read several threads and discussions on this and still am not sure of a simple way to move the assemblies created from one server to another.  
For instance, consider the following setup
- Teamcity Server (running on Windows VM)
- Build Agent (running on Solaris)
- Deployment server (running on Solaris)

What is the simplest way to automatically (for every successful build) copy artifacts from the "Build Agent" to the Deployment server?  Follow-up question would be how to label the directory it is deployed to with the exact label of the build?
I'm running Teamcity 6.x and using Ant for running the builds.

Thanks much.

Comment actions Permalink

I decided to just use a separate "deploy" build with Artifact Dependency for now, as described here:

The question of how to refer to properties defined by the other build was described here:

Thanks for the help.

Comment actions Permalink


TeamCity server maintains artifact repository by its own. Can you share a use case, why does it need to be mirrored on an additional server?

A simplest way would be to add deployment logic into as a final build step within a single configuration. If a previous build step fails, last one will not be executed. So you'll get pretty the same behavior.

With separate configurations you can set artifact dependency and use Finish Build Trigger to deploy successful builds. But it doesn't guarantee that all builds are copied - with a long build queue interim builds may be skipped.

To synchronize the process and perform deployment for each build, configure snapshot dependency in addition to that artifact dependency. Few settings in this deployment configuration should be set:

  • Only use successful builds from suitable ones in snapshot dependency
  • Get artifacts from last finished build in artifact dependency
  • Instead of Finish Build Trigger, use VCS Trigger and set its Trigger on changes in snapshot dependencies option.

To pass build number into deployment configuration, add new build parameter on Properties and Environment Variables page. Set it with its own name, and refer to<N>.build.number% in value.

Fell free to ask any additional questions if that's not clear enough.


Comment actions Permalink

Very helpful, thanks.


Please sign in to leave a comment.