summaryrefslogtreecommitdiffstats
path: root/lib/tasks
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-18 23:59:32 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-18 23:59:32 +0000
commit1951aeac78974d38ffa5528feb4b97ef6d458377 (patch)
tree74a8b68b05cf83e542948009e59e7eda875d472d /lib/tasks
parentcaf49264c89a5bb1c3cff0dbe51be24839574555 (diff)
downloadredmine-1951aeac78974d38ffa5528feb4b97ef6d458377.tar.gz
redmine-1951aeac78974d38ffa5528feb4b97ef6d458377.zip
add .travis.yml and switch database user/password by environments
git-svn-id: http://svn.redmine.org/redmine/trunk@12665 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/ci.rake16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake
index 945836162..fbc4d5688 100644
--- a/lib/tasks/ci.rake
+++ b/lib/tasks/ci.rake
@@ -54,13 +54,23 @@ file 'config/database.yml' do
when 'mysql'
dev_conf = {'adapter' => (RUBY_VERSION >= '1.9' ? 'mysql2' : 'mysql'),
'database' => dev_db_name, 'host' => 'localhost',
- 'username' => 'jenkins', 'password' => 'jenkins',
'encoding' => 'utf8'}
+ if ENV['RUN_ON_NOT_OFFICIAL']
+ dev_conf['username'] = 'root'
+ else
+ dev_conf['username'] = 'jenkins'
+ dev_conf['password'] = 'jenkins'
+ end
test_conf = dev_conf.merge('database' => test_db_name)
when 'postgresql'
dev_conf = {'adapter' => 'postgresql', 'database' => dev_db_name,
- 'host' => 'localhost',
- 'username' => 'jenkins', 'password' => 'jenkins'}
+ 'host' => 'localhost'}
+ if ENV['RUN_ON_NOT_OFFICIAL']
+ dev_conf['username'] = 'postgres'
+ else
+ dev_conf['username'] = 'jenkins'
+ dev_conf['password'] = 'jenkins'
+ end
test_conf = dev_conf.merge('database' => test_db_name)
when /sqlite3/
dev_conf = {'adapter' => (Object.const_defined?(:JRUBY_VERSION) ?