Vasu
Vasu

Reputation: 187

vagrant-aws not found when the vagrantfile is executed through jenkins

I am spinning up an ec2 instance from jenkins job using vagrant. Eventhough the vagrant-aws plugin is installed, I am getting an error mentioning "plugin vagrant-aws" not found.

But there is no error if I spin up the machine from the shell.

Version of vagrant installed : Vagrant 1.4.1 , vagrant-aws plugin installed with command : vagrant plugin install vagrant-aws

Following is the error from jenkins build

Building in workspace /var/lib/jenkins/workspace/spinup
[spinup] $ /bin/sh -xe /tmp/hudson7580124594744420690.sh
+ cd /home/ubuntu/envs/test
+ vagrant up --provider=aws
Vagrant failed to initialize at a very early stage:

The plugin "vagrant-aws" could not be found. Please make sure that it is
properly installed via `vagrant plugin`. Note that plugins made for
Vagrant 1.0.x are not compatible with 1.1+ and this error will likely
continue to show when you use `plugin install` with a 1.0.x plugin.
Build step 'Execute shell' marked build as failure
Finished: FAILURE

Upvotes: 0

Views: 426

Answers (1)

gaige
gaige

Reputation: 17491

Make sure that the Jenkins user has access to the same vagrant executable and plugins that you are testing with.

Normally Jenkins installs create a user and it might not have access to the installed copy of vagrant. As a diagnostic, you might try adding a script step that calls vagrant to get the version. Number and the plugin list.

Upvotes: 1

Related Questions