I would not commit Subversion built files back into the Subversion repository. That's just asking for trouble. Once you commit something to Subversion, it stays there forever. You can never remove the obsolete information.
Text file changes aren't so bad because they diff quite nicely, and Subversion stores each revision in diff format. However, binary files don't diff all that well. If your binary output is 500 Mb in size, each commit will add 500 Mb into your Subversion repository. Do this with Hudson, and do this after each and every build, and you're talking about hundreds of gigabytes of data in less than a year -- and most of that will be obsolete version of your code that you simply don't need.
Use Hudson itself to store your builds. One of the steps in your build process is to Archive the Artifacts. I simply use my build file to copy all the artifacts I want to store into a target/archive
directory, and have Hudson store that.
We define the Hudson job to Delete Old Builds, but leave the Days to Keep and Maximum to Keep blank. Instead, we click on the Advance button and specify how long to keep the Artifacts. This way, we never delete a build, but we keep the Hudson server with enough room on it.
In a particular build, you can click on Keep this build forever, and it will save the artifacts instead of deleting them. This allows you to keep the artifacts that have been released, but still will remove the daily build stuff you're no longer interested in.
You can even use wget
or curl
to get the artifacts and deploy them. We do this with our deploy scripts.
If you want to get fancier (and who wouldn't), put your build artifacts in a Maven repository. You can do this even if you don't use Maven for your build process. Again, this stores your artifacts, but allows you to delete and trim down the ones you don't want to keep.
If you really, really want to store your build artifacts in Subversion, you can do what you did with the batch
file, and use svn co
and svn commit -m"Some sort of message %BUILD_NUMBER%"
commands to do it. However, once something is in your Subversion repository, it's very, very difficult to remove it. Be prepared to burn through gobs of diskspace.