I’m about to setup an SVN server and I’ll need to push out code to a few remote servers of various flavors (Windows 2008 and Linux (Apache and Tomcat) ).
What is the best approach to push out code? Rsynch between servers? SFTP? Invoking SVN export from the remote server? I’m thinking a post-commit action/event on each repository to launch this. A multi-plaform solution would be key.
Edit #1
Just learned that svn export will not synch, it will leave deleted files intact on the remote server…
Edit #2
- I have to take into account of many repositories to be pushed (or pulled) to these servers.
- These involved PHP or ASP.Net projects (sites/applications)
Solution
- Installed Hudson on other servers
- checkout source code to specific locations on our web servers
- create a job for a specific project that changes directory to working copy and call svn up
- post-commit hook that does a wget on job URL – hudson/job/name_of_job/build?delay=0sec
A post-commit hook which invokes
svn updateon each remote system, with a working copy on each of those systems, is one route you can go (and common enough to be a FAQ entry).You may also want to look into a continuous integration server, especially if the items you need to push out are applications which must be compiled and deployed (as is probably the case with Tomcat). In this case, rather than pushing from the Subversion server, your CI server will poll to check for changes and pull the update(s), then run your compile/test/deploy scripts and report on the results.