Reputation: 137
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.
Upvotes: 7
Views: 951
Reputation: 99
Maybe you are using an older version of the Jenkins plugin, but now it contains a checkbox called 'Don't Kill Me'. You have to check this to keep the vm up.
Upvotes: -1
Reputation: 78011
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.
Upvotes: 9