##// END OF EJS Templates
Removed unneeded #h calls in views....
Removed unneeded #h calls in views. git-svn-id: http://svn.redmine.org/redmine/trunk@14043 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r13129:b6c0e80d37bd
r13661:b778c51e9049
Show More
ci.rake
97 lines | 3.0 KiB | text/x-ruby | RubyLexer
Toshi MARUYAMA
fix typo at lib/tasks/ci.rake...
r12819 desc "Run the Continuous Integration tests for Redmine"
Eric Davis
Add a rake task to run CI....
r3805 task :ci do
# RAILS_ENV and ENV[] can diverge so force them both to test
ENV['RAILS_ENV'] = 'test'
RAILS_ENV = 'test'
Rake::Task["ci:setup"].invoke
Rake::Task["ci:build"].invoke
Rake::Task["ci:teardown"].invoke
end
namespace :ci do
Jean-Philippe Lang
Add ci:about task to display ruby version in build output....
r13129 desc "Display info about the build environment"
task :about do
puts "Ruby version: #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
end
Jean-Philippe Lang
CI tasks cleanup....
r11053 desc "Setup Redmine for a new build"
Eric Davis
Add a rake task to run CI....
r3805 task :setup do
Toshi MARUYAMA
add "tmp:clear" to "ci:setup" rake task for new translation...
r11159 Rake::Task["tmp:clear"].invoke
Jean-Philippe Lang
CI tasks cleanup....
r11053 Rake::Task["log:clear"].invoke
Jean-Philippe Lang
Fixed that rake db:create fails with JRuby (#15218)....
r12031 Rake::Task["db:create:all"].invoke
Eric Davis
Add a rake task to run CI....
r3805 Rake::Task["db:migrate"].invoke
Rake::Task["db:schema:dump"].invoke
Toshi MARUYAMA
use environment variable for extacting SCM repositories in ci.rake...
r12151 if scms = ENV['SCMS']
scms.split(',').each do |scm|
Rake::Task["test:scm:setup:#{scm}"].invoke
end
else
Rake::Task["test:scm:setup:all"].invoke
end
Jean-Philippe Lang
Adds a rake task test:scm:update to update test repositories if needed....
r4523 Rake::Task["test:scm:update"].invoke
Eric Davis
Add a rake task to run CI....
r3805 end
desc "Build Redmine"
task :build do
Toshi MARUYAMA
use environment variable for running independent tests (units etc.) in ci.rake...
r12162 if test_suite = ENV['TEST_SUITE']
Rake::Task["test:#{test_suite}"].invoke
else
Rake::Task["test"].invoke
end
Jean-Philippe Lang
Merged rails-4.1 branch (#14534)....
r13100 # Rake::Task["test:ui"].invoke
Eric Davis
Add a rake task to run CI....
r3805 end
desc "Finish the build"
task :teardown do
end
Jean-Philippe Lang
CI tasks cleanup....
r11053 end
Eric Davis
Add a rake task to run CI....
r3805
Jean-Philippe Lang
CI tasks cleanup....
r11053 desc "Creates database.yml for the CI server"
file 'config/database.yml' do
require 'yaml'
database = ENV['DATABASE_ADAPTER']
ruby = ENV['RUBY_VER'].gsub('.', '').gsub('-', '')
branch = ENV['BRANCH'].gsub('.', '').gsub('-', '')
dev_db_name = "ci_#{branch}_#{ruby}_dev"
test_db_name = "ci_#{branch}_#{ruby}_test"
case database
when 'mysql'
Jean-Philippe Lang
Merged rails-4.1 branch (#14534)....
r13100 dev_conf = {'adapter' => 'mysql2',
Toshi MARUYAMA
ci.rake: code format cleanup...
r12036 'database' => dev_db_name, 'host' => 'localhost',
'encoding' => 'utf8'}
Toshi MARUYAMA
add .travis.yml and switch database user/password by environments...
r12390 if ENV['RUN_ON_NOT_OFFICIAL']
dev_conf['username'] = 'root'
else
dev_conf['username'] = 'jenkins'
dev_conf['password'] = 'jenkins'
end
Jean-Philippe Lang
CI tasks cleanup....
r11053 test_conf = dev_conf.merge('database' => test_db_name)
when 'postgresql'
Toshi MARUYAMA
ci.rake: code format cleanup...
r12027 dev_conf = {'adapter' => 'postgresql', 'database' => dev_db_name,
Toshi MARUYAMA
add .travis.yml and switch database user/password by environments...
r12390 'host' => 'localhost'}
if ENV['RUN_ON_NOT_OFFICIAL']
dev_conf['username'] = 'postgres'
else
dev_conf['username'] = 'jenkins'
dev_conf['password'] = 'jenkins'
end
Jean-Philippe Lang
CI tasks cleanup....
r11053 test_conf = dev_conf.merge('database' => test_db_name)
Toshi MARUYAMA
ci.rake: use 'jdbcsqlite3' for JRuby...
r12028 when /sqlite3/
dev_conf = {'adapter' => (Object.const_defined?(:JRUBY_VERSION) ?
'jdbcsqlite3' : 'sqlite3'),
Toshi MARUYAMA
ci.rake: code format cleanup...
r12027 'database' => "db/#{dev_db_name}.sqlite3"}
Jean-Philippe Lang
CI tasks cleanup....
r11053 test_conf = dev_conf.merge('database' => "db/#{test_db_name}.sqlite3")
when 'sqlserver'
Toshi MARUYAMA
ci.rake: code format cleanup...
r12027 dev_conf = {'adapter' => 'sqlserver', 'database' => dev_db_name,
'host' => 'mssqlserver', 'port' => 1433,
'username' => 'jenkins', 'password' => 'jenkins'}
Jean-Philippe Lang
CI tasks cleanup....
r11053 test_conf = dev_conf.merge('database' => test_db_name)
else
abort "Unknown database"
Jean-Philippe Lang
Adds a quick and dirty task for creating databases on the CI server....
r9201 end
Jean-Philippe Lang
CI tasks cleanup....
r11053 File.open('config/database.yml', 'w') do |f|
f.write YAML.dump({'development' => dev_conf, 'test' => test_conf})
Eric Davis
Add a rake task to run CI....
r3805 end
end