简体   繁体   中英

xargs - No such file o directory - Jenkins

I have a script running in my Jenkins to deploy my application to engineyard. My Jenkins environment have 'engineyard' gem installed.

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

I am getting an error

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

What am I doing wrong here. NOTE: I recently upgraded my Jenkins Ruby Version from 2.0.0 to 2.2.5 and restarted my Jenkins after which I started getting this error.

After restarting my jenkins instance, I had to install 'engineyard' gem again.

gem install engineyard

This solved my problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM