我正在尝试在 Cloudbees 上设置 Rails 作业,但遇到了无法再解决的问题。我尝试按照说明进行操作,但没有找到足够的详细信息来自己找出问题所在。
这就是我的工作的 Shell 执行部分目前的样子:
curl -s -o use-ruby https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/ruby/use-ruby
RUBY_VERSION=1.9.3-p327 source ./use-ruby
bundle install --path vendor/bundle
bundle exec rake db:test:create
bundle exec rake test
我实际上还不确定最后两行,因为我从来没有超过第 3 行;)
当我运行它时,我得到以下结果:
(...)
Commencing build of Revision 2e1549004e2b49903d4d006ad8bfa7e4b4bfda08 (origin/master)
Checking out Revision 2e1549004e2b49903d4d006ad8bfa7e4b4bfda08 (origin/master)
[API Continuous Testing] $ /bin/sh -xe /tmp/hudson4854632522106638677.sh
+ curl -s -o use-ruby https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/ruby/use-ruby
+ RUBY_VERSION=1.9.3-p327
+ source ./use-ruby
++ [[ -z 1.9.3-p327 ]]
++ ruby187='1.8.7-*'
++ [[ 1.9.3-p327 == 1.8.7-* ]]
++ '[' '!' -f /scratch/jenkins/use.sh ']'
++ . /scratch/jenkins/use.sh
++ mkdir -p /scratch/jenkins/ruby
+++ addon_architecture
+++ uname -m
++ ruby_name=ruby-1.9.3-p327-x86_64
++ '[' '!' -f /scratch/jenkins/ruby/ruby-1.9.3-p327-x86_64.tar.bz2 ']'
++ '[' '!' -f /scratch/jenkins/ruby/ruby-1.9.3-p327-x86_64/bin/ruby ']'
++ export PATH=/scratch/jenkins/ruby/ruby-1.9.3-p327-x86_64/bin:/opt/jdk/jdk1.6.latest/bin:/opt/jdk/latest/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/opt/maven/latest/bin:/opt/ant/latest/bin:/opt/android/android-sdk-linux/tools:/opt/gradle/latest/bin:/home/jenkins/bin:/opt/jdk/jdk.latest/bin
++ PATH=/scratch/jenkins/ruby/ruby-1.9.3-p327-x86_64/bin:/opt/jdk/jdk1.6.latest/bin:/opt/jdk/latest/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/opt/maven/latest/bin:/opt/ant/latest/bin:/opt/android/android-sdk-linux/tools:/opt/gradle/latest/bin:/home/jenkins/bin:/opt/jdk/jdk.latest/bin
++ unset GEM_PATH
++ unset GEM_HOME
++ unset BUNDLE_PATH
+ bundle install --path vendor/bundle
/tmp/hudson4854632522106638677.sh: line 5: bundle: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
我假设在 Cloudbees 安装程序完成后,“捆绑包”可供我执行。这不对吗?还是我错过了什么?