Reputation: 17203
I want to have a way to teach hudson to delete the complete workspace before doing a checkout & build. Is there a plugin which enables that?
Upvotes: 11
Views: 13686
Reputation: 73
There is an option under Advanced Project Options
: Clean workspace before build.
It does exactly what you want.
Upvotes: 3
Reputation: 2787
The Subversion plugin for Hudson now has a switch to "Emulate Checkout" -- it removes unversioned files before reverting and updating.
Upvotes: 0
Reputation: 11876
Currently, each SCM plugin provides workspace cleanup functionality. Soon, core Hudson will have this capability, and the SCM plugins will migrate the setting to that core feature: issue 3966
Upvotes: 7
Reputation: 657861
I haven't used them yet, but AFAIK there are hudson-plugins available which allow batch scripts to run as pre- and post-build steps which could delete the directory. Check out: Manage Hudson -> Manage Plugins -> Available
Upvotes: 1
Reputation: 3900
Uncheck Use Update under SCM options AND use call maven's clean phase in your command.
Upvotes: 2
Reputation: 140011
Under Source Code Management, expand the advanced properties and un-check "Use Update" (this option is present for me for CVS, not sure about all other SCM tools). This option controls if Hudson uses an "update" command to simply grab changed files from SCM, or if it checks out a new/clean copy from source control.
Upvotes: 7