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.

3 comments
Comment actions Permalink

I decided to just use a separate "deploy" build with Artifact Dependency for now, as described here: http://confluence.jetbrains.net/display/TCD6/Artifact+Dependencies

The question of how to refer to properties defined by the other build was described here: http://confluence.jetbrains.net/display/TCD6/Predefined+Build+Parameters#PredefinedBuildParameters-DependenciesProperties


Thanks for the help.

0
Comment actions Permalink

Hi

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 %dep.bt<N>.build.number% in value.

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

Thanks
Michael

0
Comment actions Permalink

Very helpful, thanks.

0

Please sign in to leave a comment.