Reputation: 722
when building a project with Jenkins and Subversion,
is it better to use the checkout command or to use export?
I know checkout, will give you a working copy and and you can use the commit and update commands of Subversion (later if needed) and you also get the .svn folders. And by using export, Subversion simply fetches a copy of the project (and no .svn folders).
What's the best practice for building a project?
Thanks for your answers,
Upvotes: 1
Views: 1548
Reputation: 4459
svn checkout
is notoriously inefficient and slow.
If Jenkins is doing a build for the purposes of checking for compilation errors, and/or running unit tests, one will never need to make any further SVN changes. Hence svn export
should certainly be used in such cases. One should prefer svn export
especially as it is roughly 6 times faster[1] than svn checkout
. It also results in a disk space consumption of roughly half that of a checkout.
I'm baffled as to why Jenkins does not provide svn export
as a standard option.
[1] In a sample repo at my employer, checkout
takes 12 - 13 minutes, and export
less than 2 minutes. The size of the resulting export is 343MB; the size of a checkout is about 646MB.
Upvotes: 3
Reputation: 4649
use checkout and option "emulate clean checkout".
If you use export, then, you'll do a full checkout of your project at each build, slowing things down, and putting more load on your SVN server.
Upvotes: 8