Question

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?

Était-ce utile?

La solution

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).

Autres conseils

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top