Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We're running VisualSVN server on windows.

In short, what techniques are there to automatic deploy changed files to a staging server after committing?

I know there's something like SVN hooks, and while there are lots of useful hook scripts or executables hooks out there, i have not found one able to copy the changed files after a commit to a certain directory.

So my question is: what strategies can i use to automatically deploy my repository to a staging server, this especially for big websites with thousands of files, so updating a repo on the or multiple staging server(s) is rather slow.

Thanks!

share|improve this question
add comment

4 Answers

up vote 3 down vote accepted

Have you checked out CruiseControl.NET?

This can do what you're asking, and much more besides...

share|improve this answer
    
from reading the docs, svn support is not complete yet, or as they state, the advanced features aren't supported yet. but what i'm describing is possible with CruiseControl.NET? i will give it a spin... thanks –  Sander Versluys May 8 '09 at 16:21
    
CC.NET can be used to drive Nant scripts, which can be used to do virtually anything. Good luck :-) –  tomfanning May 10 '09 at 10:30
add comment

You should be able to use a post-commit hook to run an svn export from the repository out to whatever location you want. It might require the hook to do the export, then do the FTP, or have the export land in a folder watched by some other process that will push changes out.

I'm starting to build this on our new VisualSVN server, but haven't gotten a solution put together yet. Once I have the pieces figured out I'll update you.

share|improve this answer
    
that would be awesome... on linux there are svn2web php scripts which do exactly what i want and i have started writing a port in .net, but it's far from finished... –  Sander Versluys May 8 '09 at 13:57
add comment

Coming from a developers perspective, and this may be stack/platform dependent, but there is usually an intermediate step between the source repository and deployment of code that is handled by a build server, unless you are talking about purely script or static files.

A common scenario is that a build server would be notified of the code/file changes and would kick off a build. The build would handle things like compilation, running unit tests and configuration for various environments and from there you can tie your build revisions to subversion revisions and even kick off a deployment from there.

share|improve this answer
    
yes i've read about these worksflows, but here at my work, we are far from such a 'professional' environment, but slowly we're getting to that... as i've just come out of school and started working, i do not have any experience with it. Also we make various websites, mostly scripts, but more and asp.net, so building is idd part of the process... –  Sander Versluys May 8 '09 at 16:24
add comment

Have you looked at jenkins? :)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.