3

I'm using cruisecontrol.rb for continuous integration, and have the following settings in cruise_config.rb.

Project.configure do |project|
  ...
  project.build_command = 'my_build_script.sh'
  ...
end

I've tried to follow this blog post.

However, I can't get 'my_build_script.sh' to run. It kicks off by running 'bundle install'. Any ideas?

timoxley
  • 5,156
  • 3
  • 36
  • 40
sren
  • 3,513
  • 4
  • 25
  • 28
  • I'm confused--do you still have a question, or are you satified with commenting out the above code as per your update? – mwolfetech Sep 08 '11 at 01:04

2 Answers2

2

In cruisecontrol.rb in app/models/build.rb:42

if @project.uses_bundler?
 execute self.bundle_install, :stdout => build_log_path, :stderr => build_log_path, :env => project.environment
end

It is hard coded to run bundler first if it detects a Gemfile, I commented this out and did it manually after the rvm gemset was set and it worked.

Here is a forked version (massive ui changes though) https://github.com/timoxley/cruisecontrol.rb

sren
  • 3,513
  • 4
  • 25
  • 28
  • Cruise allows you disable the automatic `bundle install`, via `project.use_bundler = false`. See [original announcement](http://comments.gmane.org/gmane.comp.lang.ruby.cruise-control.devel/288) – Kelvin Sep 06 '13 at 21:23
1

Cruise allows you disable the automatic bundle install, via project.use_bundler = false.

See the feature announcement.

It's a shame that the default is true, making bundle install behave strangely with rvm gemsets. They should've made the feature opt-in instead of automatic, seeing that a lot of people use rvm gemsets.

Apparently cruise will use the same GEM_HOME as the parent cruise process is using. If you're running cruise under Phusion Passenger, it'll use the GEM_HOME where the passenger gem is installed (I'm not sure if this is still a problem with passenger 4 though).

Kelvin
  • 20,119
  • 3
  • 60
  • 68