How to combine Vagrant with Jenkins for the perfect Continuous Integration Environment?
it is a good solution for build system, my suggestion:
- Your current jenkins works as master CI (probably started by user jenkins)
- Create another user in same machine or another machine to work as jenkins slave mode
- jenkins slave can be invoked from jenkins master, and it can use different user like vagrant who had permission and environment for vagrant, therefore it will not interfere the original jenkins master server
- create your base vagrant box, then it can be reused to speedup for your deployment
- Most of the installation information (packages) could be managed by puppet (or chef) to be loaded into your vm box.
Probably you can take a look at veewee, which can create vagrant box on fly.
Here is the Make CI easier with Jenkins CI and Vagrant for my guideline for this suggestion.
You could try the Vagrant Plugin for Jenkins that currently supports Jenkins CD 1.532.3
You can see a demo of this plugin running at http://unethicalblogger.com/2012/03/13/vagrant-plugin-in-action.html