CI builds that run simultaneously should have absolutely nothing in common.
Here is how I would do it:
1. Have two separate Rails environments (with different database settings),
e.g. cruise_trunk and cruise_staging.
2. Set RAILS_ENV accordingly, before invoking Rake.
3. Forget about the development database altogether, and use something like
db:migrate:reset instead, for the CI build. This can be done by adding
something like this at the end of your Rakefile:
if ENV['RAILS_ENV'] =~ /cruise_/
%w(test:units test:functionals test:integration).each do |task_name|
Rake::Task[task_name].dependencies.delete('db:test:prepare')
Rake::Task[task_name].dependencies << 'db:migrate:reset'
end
end
On the trunk of CC.rb, we now have an option to prevent builds from running
simultaneously altogether. This is not in a released version yet.
--
Alex
_______________________________________________
Cruisecontrolrb-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users