]> source.dussan.org Git - redmine.git/commitdiff
Adds support for environment variable for CI postgresql host.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 20 Nov 2023 16:04:44 +0000 (16:04 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 20 Nov 2023 16:04:44 +0000 (16:04 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@22468 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/tasks/ci.rake

index 8c7f8b68f9cec4b3bff38247472860ddc1d075f5..cb0e639e86602fe934fd8cbdd2f08cf8e3ced16f 100644 (file)
@@ -69,7 +69,7 @@ file 'config/database.yml' do
     test_conf = dev_conf.merge('database' => test_db_name)
   when /postgresql/
     dev_conf =  {'adapter' => 'postgresql', 'database' => dev_db_name,
-                 'host' => 'localhost'}
+                 'host' => (ENV['CI_PG_HOST'] || 'localhost')}
     if ENV['RUN_ON_NOT_OFFICIAL']
       dev_conf['username'] = 'postgres'
     else