我正在尝试设置jenkins,但它一直在execute shell
部分失败。
我收到以下错误:
/tmp/hudson1424221209017954242.sh: line 8: gem: command not found
/tmp/hudson1424221209017954242.sh: line 9: bundle: command not found
/tmp/hudson1424221209017954242.sh: line 12: bundle: command not found
我在全局设置了rvm(位于/ usr / local / rvm /)。存储jenkins的用户jenkins
可以通过ssh运行bundle。
这是execute shell
命令:
#!/bin/bash
source /var/lib/jenkins/.bashrc
# enter application root
cd /var/lib/jenkins/jobs/topboard/workspace
# install missing gems
rvm use 2.1.2@gemset --create
# set env vars
gem install bundler
bundle install
export RAILS_ENV=test
# invoke rake
bundle exec rake db:create db:migrate ci:setup:rspec
谢谢!