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.

Reply via email to