diff options
Diffstat (limited to 'ci/ci_build.rb')
-rwxr-xr-x | ci/ci_build.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/ci/ci_build.rb b/ci/ci_build.rb index 7ae660fb7d..c8f0f9946b 100755 --- a/ci/ci_build.rb +++ b/ci/ci_build.rb @@ -7,26 +7,25 @@ def root_dir end def rake(*tasks) - tasks.each { |task| return false unless system("#{root_dir}/bin/rake", task) } + tasks.each { |task| return false unless system("bundle exec rake", task) } true end puts "[CruiseControl] Rails build" build_results = {} -# Requires gem home and path to be writeable and/or overridden to be ~/.gem, -# Will enable when RubyGems supports this properly (in a coming release) -# build_results[:geminstaller] = system 'geminstaller --exceptions' +# Install rubygems-update, so 'gem update --system' in cruise_config.rb auto-installs it on next build. +# This is how you can auto-update rubygems without logging in to CI system +build_results[:geminstaller] = system "sudo gem install rubygems-update -v 1.3.5 --no-ri --no-rdoc" -# for now, use the no-passwd sudoers approach (documented in ci_setup_notes.txt) -# A security hole, but there is nothing valuable on rails CI box anyway. -build_results[:geminstaller] = system "sudo geminstaller --config=#{root_dir}/ci/geminstaller.yml --exceptions" +# Install required version of bundler. +build_results[:geminstaller] = system "sudo gem install bundler -v 0.9.0.pre3 --prerelease --no-ri --no-rdoc" cd root_dir do puts puts "[CruiseControl] Bundling RubyGems" puts - build_results[:bundle] = system 'rm -rf vendor && env CI=1 gem bundle --update && chmod 755 bin vendor vendor/gems' + build_results[:bundle] = system 'env CI=1 sudo bundle install' end cd "#{root_dir}/activesupport" do @@ -107,7 +106,7 @@ puts "[CruiseControl] #{`pg_config --version`}" puts "[CruiseControl] SQLite3: #{`sqlite3 -version`}" `gem env`.each_line {|line| print "[CruiseControl] #{line}"} puts "[CruiseControl] Bundled gems:" -`gem bundle --list`.each_line {|line| print "[CruiseControl] #{line}"} +# `gem bundle --list`.each_line {|line| print "[CruiseControl] #{line}"} puts "[CruiseControl] Local gems:" `gem list`.each_line {|line| print "[CruiseControl] #{line}"} |