4
votes

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!

4 Answers 4

3
votes

Have you checked out CruiseControl.NET?

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

2
  • 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 May 8, 2009 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, 2009 at 10:30
1
vote

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.

1
  • 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... May 8, 2009 at 13:57
0
votes

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.

1
  • 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... May 8, 2009 at 16:24
0
votes

Have you looked at jenkins? :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .