Matthew O''Riordan
2010-Oct-15 16:41 UTC
[Cruisecontrolrb-users] CruiseControl.rb and Database settings
Hi all I have set up CruiseControl.rb on an Ubuntu box, and all seems to be working quite well at present. However, I am not sure how best to approach the issue of using database settings specific to the CC server and not storing these anywhere in the source control repository. I read an article at http://blog.lrdesign.com/2010/02/howto-setting-up-cruisecontrol-rb-on-slicehost/ which suggest you make the following change to the cruise_config.rb file: project.build_command = ''rake ci:run[localhost,root,<YOUR_MYSQL_ROOT_PASSWORD>,<DATABASE_NAME>] --trace RAILS_ENV=test'' The problem I have with that is that in order to get CC working with Bundler I''ve created a build_my_app.sh shell script and have that referenced in the build command. In that file I have something along the lines of bundle install ruby -e "require ''rubygems'' rescue nil; require ''rake''; load ''/Users/matt/cruisecontrol/tasks/cc_build.rake''; ARGV << ''--nosearch'' << ''cc:build''; Rake.application.run; ARGV.clear" So where and how do I inject database settings specific for this CC server? Sorry if I am asking stupid questions, but I''m only one day into using CruiseControl.rb. Thanks, Matthew O''Riordan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/cruisecontrolrb-users/attachments/20101015/03439326/attachment-0001.html>
Todd Sedano
2010-Oct-15 17:09 UTC
[Cruisecontrolrb-users] CruiseControl.rb and Database settings
I''m also a cruisecontrol novice, but this is how I solve the problem. I don''t check the config/database.yml file into source control. I create a .gitignore or .svnignore so that it doesn''t accidentally end up in the repository. After I create the project on the build machine, I go to the .cruise/projects/NAME/work directory and create my own config/database.yml file This works provided that no one checks in a config/database.yml file I''m hoping one of the advance users will tell of a better way =) Thanks, Todd -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/cruisecontrolrb-users/attachments/20101015/6ebf6ac7/attachment.html>
Alexey Verkhovsky
2010-Oct-15 17:32 UTC
[Cruisecontrolrb-users] CruiseControl.rb and Database settings
On Fri, Oct 15, 2010 at 11:09 AM, Todd Sedano <todd.sedano at sv.cmu.edu>wrote:> I don''t check the config/database.yml file into source control. I create a > .gitignore or .svnignore so that it doesn''t accidentally end up in the > repository. > > After I create the project on the build machine, I go to the > .cruise/projects/NAME/work directory and create my own config/database.yml > file >i''m a big fan of simple soltions that work, so that''s exactly how I like to do it. On the premise that not every developer''s box should contain access details to all of our umpteen production databases, anyway. Therefore, source-control config/database.yml.example and have it symlinked as database.yml on development machines. Symlink to a local file like /etc/myapplication/database.yml on prod and ci servers. Problem solved. -- Alexey Verkhovsky http://alex-verkhovsky.blogspot.com/ CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/cruisecontrolrb-users/attachments/20101015/8460db71/attachment.html>