2013-12-19 22 views
0

我正在使用流浪者從jenkins工作中旋轉出一個ec2實例。儘管安裝了vagrant-aws插件,但我收到一個錯誤提到「插件vagrant-aws」未找到。vagrant-aws當vagrantfile通過jenkins被執行時沒有找到

但是,如果我從機殼上旋轉機器,則不會出現錯誤。安裝

版本顛沛流離的:放浪1.4.1,安裝使用命令 流浪漢-AWS插件:vagrant plugin install vagrant-aws

以下是該錯誤詹金斯建立

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 
+0

你是否像Jenkins運行的用戶那樣運行vagrant?通常詹金斯安裝創建一個用戶,它可能無法訪問已安裝的vagrant副本。作爲一個診斷,你可能會嘗試添加一個腳本步驟來調用vagrant來獲取版本。數字和插件列表。 – gaige

+0

感謝gaige。你是對的,不同的用戶,我改變了用戶,現在它工作正常。 – Vasu

回答

1

確保詹金斯用戶具有訪問權限到您正在測試的相同流浪者可執行文件和插件。

通常Jenkins安裝會創建一個用戶,並且它可能無法訪問已安裝的vagrant副本。作爲一個診斷,你可能會嘗試添加一個腳本步驟來調用vagrant來獲取版本。數字和插件列表。