views:

1139

answers:

2

I'm fairly new to Subversion. Most of my work so far has been with Visual Source Safe. I'm looking to improve my deployment process with SVN and TeamCity. This is my plan:

There would be three branches:

  1. Development (/trunk) - Entire ASP.NET solution, including a Web Deployment Project.
  2. Staging (/branches/staging) - Web Deployment Project output (files needed for execution only - bin, .aspx, images, etc)
  3. Deployment (/branches/deployment) - same as Staging

The CI process:

  1. Commit source changes in trunk.
  2. TeamCity detects the change, builds the solution and runs unit tests.
  3. If all tests pass, TeamCity commits Web Deployment Project output to branches/staging and exports it to wwwroot on the staging web server.

Then when I'm ready to deploy to production, I'll do the following manually:

  1. Merge branches/staging with branches/production
  2. Update production web server's working copy of branches/production.

Does this make sense? Is there anything that a VSS user like myself might be missing/misunderstanding in this process?

+1  A: 

This might work for you, but usually the stage is the place where customers accept changes. If you deploy on each build they dont get a consistent behaviour.

We dont keep the build result in SVN. For us it was ok to just have it in Teamcity under artifacts. I am not shure if we use best practice at this point.

You will be so much happier with SVN and Teamcity...good luck!

Malcolm Frexner
That's a good point about staging. I don't think it will be too much of an issue since I'm an internal developer and our "customers" are mainly my boss and one or two managers in other departments. Thanks for the advise!
jrummell
I was hoping for at least two answers before I accept one, but since yours is the only one, I'll accept it. Not that I don't like your answer, I was just hoping for a few different opinions. Thanks!
jrummell
+2  A: 

Hi there, I've written a pretty long post on how to do this with ASP.Net and web deployment projects - sounds right up your alley (don't know if I'm allowed to post this - mods?):

http://www.diaryofaninja.com/blog/2010/05/09/automated-site-deployments-with-teamcity-deployment-projects-amp-svn

Doug
Excellent post! You covered all of the configuration issues I worked out a few months ago.
jrummell