I've been having this problem for a while. Vagrant boxes abort at the end of a Jenkins job. I've limited the job to just a script with
vagrant up
sleep 60
For 60 seconds vagrant boxes are running, but the second the job finishes vagrant boxes are aborted.
This behaviour is caused by the Jenkins process tree killer. I got it to work by running Jenkins as follows:
java -Dhudson.util.ProcessTree.disable=true -jar jenkins-1.537.war
Another (less global) work-around is to run vagrant as follows:
BUILD_ID=dontKillMe vagrant up
Makes sense in retrospect. Processes launched by a Jenkins job should be cleaned up at the end. Of course this would be a "gotcha" is you're attempting to use Jenkins to launch long running processes.
+1 for this question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With