Matt Brailsford
Matt Brailsford

Reputation: 2237

How to do code deployments via Mercurial?

Does anybody have an example process / tutorial for deploying ASP.NET code to a windows server via mercurial?

I've found an example for linux based servers, and one using dropbox:

http://stevelosh.com/blog/2009/01/deploying-site-fabric-and-mercurial/
http://blog.wekeroad.com/danger-danger/git-and-dropbox-sitting-in-a-tree

but I'm looking for something more windows based, and a little less "hackish" than dropbox.

Cheers

Matt

Upvotes: 4

Views: 483

Answers (1)

Tim
Tim

Reputation: 4410

We're looking at exactly the same deployment scenario, In that we want to use Mercurial to deploy our websites.

The current process we are attempting to implement would look something like this.

We will have several Mercurial repos. Dev, Staging and Live.

Dev and Staging contain the full source code of the webapp. These are hosted internally and we use Teamcity to build these out to our dev/staging servers, with a nice simple Robocopy deploy.

However we don't really want to deploy all the un-compiled source to the live servers. So the Live repo contains only the fully built dlls (in the bin directory of the website) and the website itself.

We will use a Teamcity automated build to update our live version of the site and commit it to the Live repo.

Then as a manual step would would login to the actual live server and pull the latest version from the live repo. At this point we can either deploy direct and prevent serving of the .hg folder, or do an xcopy/robocopy deploy.

I'm in the midst of wiring all this up at the moment so it's just proof of concept and am happy to receive comments!

Tim

Upvotes: 1

Related Questions