Mercurial > hg > soundsoftware-site
comparison lib/tasks/.svn/text-base/ci.rake.svn-base @ 14:1d32c0a0efbf
* Update to SVN trunk (revisions 3892-4040)
author | Chris Cannam |
---|---|
date | Wed, 25 Aug 2010 16:30:24 +0100 |
parents | |
children | af80e5618e9b |
comparison
equal
deleted
inserted
replaced
4:9cc62779c13a | 14:1d32c0a0efbf |
---|---|
1 desc "Run the Continous Integration tests for Redmine" | |
2 task :ci do | |
3 # RAILS_ENV and ENV[] can diverge so force them both to test | |
4 ENV['RAILS_ENV'] = 'test' | |
5 RAILS_ENV = 'test' | |
6 Rake::Task["ci:setup"].invoke | |
7 Rake::Task["ci:build"].invoke | |
8 Rake::Task["ci:teardown"].invoke | |
9 end | |
10 | |
11 # Tasks can be hooked into by redefining them in a plugin | |
12 namespace :ci do | |
13 desc "Setup Redmine for a new build." | |
14 task :setup do | |
15 Rake::Task["ci:dump_environment"].invoke | |
16 Rake::Task["db:create"].invoke | |
17 Rake::Task["db:migrate"].invoke | |
18 Rake::Task["db:schema:dump"].invoke | |
19 end | |
20 | |
21 desc "Build Redmine" | |
22 task :build do | |
23 Rake::Task["test"].invoke | |
24 end | |
25 | |
26 # Use this to cleanup after building or run post-build analysis. | |
27 desc "Finish the build" | |
28 task :teardown do | |
29 end | |
30 | |
31 desc "Dump the environment information to a BUILD_ENVIRONMENT ENV variable for debugging" | |
32 task :dump_environment do | |
33 | |
34 ENV['BUILD_ENVIRONMENT'] = ['ruby -v', 'gem -v', 'gem list'].collect do |command| | |
35 result = `#{command}` | |
36 "$ #{command}\n#{result}" | |
37 end.join("\n") | |
38 | |
39 end | |
40 end | |
41 |