Commit 8e20b15e authored by bogdanvlviv's avatar bogdanvlviv

Remove using of `GITLAB_DATABASE` environment variable

Since the app supports PostgreSQL only there is  no need in this variable.
parent 08ec8362
...@@ -16,25 +16,21 @@ retry gem install knapsack --no-document ...@@ -16,25 +16,21 @@ retry gem install knapsack --no-document
cp config/gitlab.yml.example config/gitlab.yml cp config/gitlab.yml.example config/gitlab.yml
sed -i 's/bin_path: \/usr\/bin\/git/bin_path: \/usr\/local\/bin\/git/' config/gitlab.yml sed -i 's/bin_path: \/usr\/bin\/git/bin_path: \/usr\/local\/bin\/git/' config/gitlab.yml
export GITLAB_DATABASE='postgresql' cp config/database.yml.postgresql config/database.yml
cp config/database.yml.$GITLAB_DATABASE config/database.yml if [ -f config/database_geo.yml.postgresql ]; then
cp config/database_geo.yml.postgresql config/database_geo.yml
if [ -f config/database_geo.yml.$GITLAB_DATABASE ]; then
cp config/database_geo.yml.$GITLAB_DATABASE config/database_geo.yml
fi fi
# Set user to a non-superuser to ensure we test permissions # Set user to a non-superuser to ensure we test permissions
sed -i 's/username: root/username: gitlab/g' config/database.yml sed -i 's/username: root/username: gitlab/g' config/database.yml
if [ "$GITLAB_DATABASE" = 'postgresql' ]; then sed -i 's/localhost/postgres/g' config/database.yml
sed -i 's/localhost/postgres/g' config/database.yml sed -i 's/username: git/username: postgres/g' config/database.yml
sed -i 's/username: git/username: postgres/g' config/database.yml
if [ -f config/database_geo.yml ]; then if [ -f config/database_geo.yml ]; then
sed -i 's/localhost/postgres/g' config/database_geo.yml sed -i 's/localhost/postgres/g' config/database_geo.yml
sed -i 's/username: git/username: postgres/g' config/database_geo.yml sed -i 's/username: git/username: postgres/g' config/database_geo.yml
fi
fi fi
cp config/resque.yml.example config/resque.yml cp config/resque.yml.example config/resque.yml
......
...@@ -14,9 +14,7 @@ function retry() { ...@@ -14,9 +14,7 @@ function retry() {
} }
function setup_db_user_only() { function setup_db_user_only() {
if [ "$GITLAB_DATABASE" = "postgresql" ]; then
source scripts/create_postgres_user.sh source scripts/create_postgres_user.sh
fi
} }
function setup_db() { function setup_db() {
......
...@@ -18,7 +18,6 @@ rspec_profiling_is_configured = ...@@ -18,7 +18,6 @@ rspec_profiling_is_configured =
ENV['RSPEC_PROFILING_POSTGRES_URL'].present? || ENV['RSPEC_PROFILING_POSTGRES_URL'].present? ||
ENV['RSPEC_PROFILING'] ENV['RSPEC_PROFILING']
branch_can_be_profiled = branch_can_be_profiled =
ENV['GITLAB_DATABASE'] == 'postgresql' &&
(ENV['CI_COMMIT_REF_NAME'] == 'master' || (ENV['CI_COMMIT_REF_NAME'] == 'master' ||
ENV['CI_COMMIT_REF_NAME'] =~ /rspec-profile/) ENV['CI_COMMIT_REF_NAME'] =~ /rspec-profile/)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment