##// END OF EJS Templates
Blank content type for attachments attached via Ajax file upload (Patch by Jens Krämer)....
Blank content type for attachments attached via Ajax file upload (Patch by Jens Krämer). git-svn-id: http://svn.redmine.org/redmine/trunk@13125 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r12819:8c5d88160f16
r12850:61776a8b7e60
Show More
ci.rake
92 lines | 2.9 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
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
Toshi MARUYAMA
not run Capybara tests on the CI server (#12822)...
r11749 # Rake::Task["test:ui"].invoke if RUBY_VERSION >= '1.9.3'
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'
Toshi MARUYAMA
ci.rake: code format cleanup...
r12027 dev_conf = {'adapter' => (RUBY_VERSION >= '1.9' ? 'mysql2' : 'mysql'),
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