2017-03-17 155 views
0

我有一個腳本運行在我的詹金斯將我的應用程序部署到engineyard。我的Jenkins環境安裝了'engineyard'gem。xargs - 沒有這樣的文件目錄 - 詹金斯

first_customer_symbol=`bundle exec rake customer:deploy_targets[$DEPLOY_TO] | sed '1!d' 
ey status --account='account-****' --app="$first_customer_symbol" --environment="$DEPLOY_TO" | grep "Resolved Ref" | grep -Po "\b[0-9a-f]{5,40}\b" | xargs -i git diff --exit-code HEAD {} db/migrate 1> /dev/null 
new_migrations=$?; if [ $new_migrations != 0 ]; then 
bundle exec rake customer:deploy_targets[$DEPLOY_TO] | xargs -n1 -P 7 ey deploy -e $DEPLOY_TO -r $BRANCH_TO_DEPLOY --migrate -a 
else 
bundle exec rake customer:deploy_targets[$DEPLOY_TO] | xargs -n1 -P 7 ey deploy -e $DEPLOY_TO -r $BRANCH_TO_DEPLOY --no-migrate -a 
fi 

我得到一個錯誤

xargs: ey: No such file or directory 
xargs: ey: No such file or directory 
xargs: ey: No such file or directory 
xargs: ey: No such file or directory 
xargs: ey: No such file or directory 
xargs: ey: No such file or directory 
xargs: ey: No such file or directory 

我在做什麼錯在這裏。 注意:我最近將Jenkins Ruby版本從2.0.0升級到2.2.5,並重新啓動了我的Jenkins,之後我開始出現此錯誤。

+0

我沒有答案。看起來很奇怪,第2行的第一個「ey」工作正常,但沒有其他的。 –

回答

0

重新啓動我的jenkins實例後,我不得不再次安裝'engineyard'gem。

gem install engineyard 

這解決了我的問題。