Skip to content
This repository has been archived by the owner on Mar 8, 2018. It is now read-only.

vagrant plugin does not trigger vagrant remotely in Jenkins #16

Open
thamps opened this issue Mar 21, 2012 · 12 comments
Open

vagrant plugin does not trigger vagrant remotely in Jenkins #16

thamps opened this issue Mar 21, 2012 · 12 comments
Assignees

Comments

@thamps
Copy link

thamps commented Mar 21, 2012

Using a Master Slave setup with Jenkins.
Slave server hosts vagrant and VBox for creation of instant boxes.

Enabling vagrant plugin in jenkins, and pointing to Slave server for triggering vagrant boot. In the slave setup, jenkins checks out the vagrant file into the remote workspace only.

It is found that the vagrant plugin looks for a Vagrantfile in the local workspace rather than looking for it in the Slave workspace. So when this plugin is used for booting, it complains with

Building remotely on jenkins_slave_1 in workspace /var/lib/jenkins/workspace/demo
Cleaning local Directory .
Checking out http://192.168.3.49/svn/training/box10/vagrant-vm-ubuntu-i386
A         Vagrantfile
At revision 73
There is no Vagrantfile in your workspace!
We looked in: /var/lib/jenkins/workspace/demo
Finished: NOT_BUILT

Once I created a workspace in local workspace, it fails with

Building remotely on jenkins_slave_1 in workspace /home/aristocrat/workspace/demo
Cleaning local Directory .
Checking out http://192.168.3.49/svn/training/box10/vagrant-vm-ubuntu-i386
A         Vagrantfile
At revision 74
no change for http://192.168.3.49/svn/training/box10/vagrant-vm-ubuntu-i386 since the previous build
Running Vagrant with version: 1.0.2.dev
Vagrantfile loaded, bringing Vagrant box up for the build
FATAL: (VirtualBoxNotDetected) Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
this to be available on the PATH. If VirtualBox is installed, please find the
`VBoxManage` binary and add it to the PATH environmental variable.
org.jruby.exceptions.RaiseException: (VirtualBoxNotDetected) Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
this to be available on the PATH. If VirtualBox is installed, please find the
`VBoxManage` binary and add it to the PATH environmental variable.
        at Vagrant::Driver::VirtualBox.initialize(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/driver/virtualbox.rb:40)
        at Vagrant::VM.reload!(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/vm.rb:129)
        at Vagrant::VM.initialize(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/vm.rb:35)
        at Vagrant::Environment.load_vms!(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/environment.rb:434)
        at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612)
        at Vagrant::Environment.load_vms!(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/environment.rb:433)
        at Vagrant::Environment.vms(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/environment.rb:125)
        at Vagrant::Environment.multivm?(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/environment.rb:158)
        at Vagrant::Environment.vms_ordered(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/environment.rb:133)
        at Vagrant::Command::Base.with_target_vms(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/command/base.rb:91)
        at Vagrant::Command::Up.execute(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/command/up.rb:24)
        at Vagrant::CLI.execute(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/cli.rb:38)
        at Vagrant::Environment.cli(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/environment.rb:167)
        at Vagrant::BasicWrapper.setup(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/models/vagrant_wrapper.rb:67)
        at Jenkins::Model::EnvironmentProxy::InstanceMethods.setUp(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/gems/jenkins-plugin-runtime-0.1.26/lib/jenkins/model/environment_proxy.rb:7)
@ghost ghost assigned rtyler Mar 21, 2012
@rtyler
Copy link
Owner

rtyler commented Mar 21, 2012

Starting work on this now.

(This message brought to you by Hub board)

@rtyler
Copy link
Owner

rtyler commented Mar 21, 2012

Looks like this is going to require a lot of work on the ruby-runtime to execute code properly on the slaves. Damnit.

@rtyler
Copy link
Owner

rtyler commented Mar 21, 2012

Putting this issue back on the back-burner.

(This message brought to you by Hub board)

@dieterdemeyer
Copy link

@rtyler do you have an idea as to if and when this issue will be handled ?

@rtyler
Copy link
Owner

rtyler commented Apr 17, 2012

If should be handled eventually, unfortunately this will require a lot of work in the Ruby plugin support itself to execute Ruby code on the slaves :(

@jimi-c
Copy link

jimi-c commented Dec 19, 2012

So, last update on this was 8 months ago, has there been any progress on this? I'm still running into this issue.

@axelson
Copy link

axelson commented Dec 21, 2012

Since this is a major issue I've added it to the Vagrant plugin's page on the Jenkins wiki:
https://wiki.jenkins-ci.org/display/JENKINS/Vagrant+Plugin

@tbartelmess
Copy link

Is anyone working on this?

@vishnudxb
Copy link

Hi, I install vagrant plugin in Jenkins and when I try to build, I am getting the below errors. Please help me to solve this issue

Started by user anonymous
Building in workspace /var/lib/jenkins/jobs/testvagrant/workspace
Running Vagrant with version: 1.0.2.dev
FATAL: (ArgumentError) wrong number of arguments calling initialize (1 for 0)
org.jruby.exceptions.RaiseException: (ArgumentError) wrong number of arguments calling initialize (1 for 0)
at RUBY.initialize(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/environment.rb:77)
at RUBY.setup(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/models/vagrant_wrapper.rb:63)
at RUBY.setUp(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/gems/jenkins-plugin-runtime-0.1.26/lib/jenkins/model/environment_proxy.rb:7)

@davidkarlsen
Copy link

Any news on this? Not very useful for only running on master...

@cbarraford
Copy link

would love to see this resolved, any progress?

@phutchin
Copy link

phutchin commented Mar 3, 2015

Is there any news on when this might be fixed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants