##// END OF EJS Templates
Add a rake task to run CI....
Eric Davis -
r3805:ab546a14cb9f
parent child
Show More
@@ -0,0 +1,41
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
General Comments 0
You need to be logged in to leave comments. Login now