Hi, I've never seen a way to do that, neither a plugin. BTW, that would require having an extension point on a WS wipeout request, not sure there is one.
Cheers Le 26 nov. 2015 9:49 AM, "Björn Stabel" <bjoern.sta...@data-experts.de> a écrit : > I don't want to run a build step pre-scm, but pre-wipe, i.e. when the user > clicks "wipe workspace", but before the workspace is actually wiped. > > On 11/24/2015 12:43 PM, Mark Waite wrote: > > After you reviewed > https://wiki.jenkins-ci.org/display/JENKINS/pre-scm-buildstep for the > Pre-SCM Build Step? > > You may also want to consider the advice in > http://stackoverflow.com/questions/10123914/how-to-add-some-prebuild-steps-to-jenkins > and > see if there is a way to add that step to the build script itself, rather > than making it part of the Jenkins job definition. > > Mark Waite > > On Tue, Nov 24, 2015 at 4:28 AM Björn Stabel < > bjoern.sta...@data-experts.de> wrote: > >> I'm still having this problem. Is anyone aware of a solution, like a >> pre-wipe action plugin? >> >> On 10/22/2015 12:49 PM, Björn Stabel wrote: >> > Hello, >> > >> > I have a job that constructs a Vagrant environment in the workspace >> > directory. >> > To that Vagrant environment belongs a VirtualBox VM, stored elsewhere. >> > Vagrant keeps track of which Vagrant environment belongs to which >> > VirtualBox VM through a directory named ".vagrant" in the workspace >> > directory. >> > >> > The problem is this: >> > If a user wipes the workspace of that job, the .vagrant directory is >> > gone, but the VirtualBox VM still exists. >> > The next time the job is run, Vagrant cannot find the existing VM, so >> > a new VM is created, taking up extra disk space. >> > >> > Preparing the VM takes some time and involves creating a snapshot on >> > which all future runs can base, so destroying the VM in a post-build >> > step would significantly increase build times. >> > >> > Is there a way I could tell Jenkins to destroy the VM (by running >> > "vagrant destroy -f", for example) before wiping the workspace? >> > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jenkinsci-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-users/565449C7.1000400%40data-experts.de >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtF-W98KPv9%2Bh-_JFsZ8Rjo-CUE8Up1AchvDSZ8LHSZT4Q%40mail.gmail.com > <https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtF-W98KPv9%2Bh-_JFsZ8Rjo-CUE8Up1AchvDSZ8LHSZT4Q%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/5656C7A5.9080803%40data-experts.de > <https://groups.google.com/d/msgid/jenkinsci-users/5656C7A5.9080803%40data-experts.de?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS4Vp7yVxT3CCi4BCRgzpwv%2B_PfY6iisbN8BTnVZPK-bBg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.