summaryrefslogtreecommitdiff
path: root/scripts/prepare_build.sh
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-05-17 15:40:39 +0100
committerFilipa Lacerda <filipa@gitlab.com>2018-05-17 15:40:39 +0100
commit49673de34f326a15d3358cb4ff22a73dfa5d4b20 (patch)
tree456d5744b1afb95ce12d7a2364f2dd7842b88a0d /scripts/prepare_build.sh
parent9e61d26c35acd6e60ac0fb0df711dbfdfda7c448 (diff)
parentd9b78477000dafc4f8b8fd7e795e97649b8c6718 (diff)
downloadgitlab-ce-46381-dropdown-mr-widget.tar.gz
Merge branch 'master' into 46381-dropdown-mr-widget46381-dropdown-mr-widget
* master: (40 commits) Add changelog Update quick_start_guide.md Resolve "Opening Project with invite but without accepting leads to 404 error page" Respect the inheritance chain between Ci::Build and CommitStatus Remove unneccessary imports fixed copy to cliboard button in embedded snippets Fix Error 500 viewing admin page due to statement timeouts Grant privileges after database is created Only setup db in the first checkout! Project Sidebar: Split CI/CD into CI/CD and Operations Fix GPM content types for Doorkeeper Workhorse to send raw diff and patch for commits Refactor out duplication in runner_policy.rb Remove unnecessary runner.is_shared? checks in api because they are handled by policy Allow admin to assign shared runner to project through API Change policy list_runner_jobs -> read_runner Rename User#ci_authorized_runners -> ci_owned_runners Improve efficiency of authorized_runner policy query Use can? policies for lib/api/runners.rb Allow group runners to be viewed/edited in API ...
Diffstat (limited to 'scripts/prepare_build.sh')
-rw-r--r--scripts/prepare_build.sh18
1 files changed, 3 insertions, 15 deletions
diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh
index 206d62dbc78..d8bcc9f8191 100644
--- a/scripts/prepare_build.sh
+++ b/scripts/prepare_build.sh
@@ -49,20 +49,8 @@ sed -i 's/localhost/redis/g' config/redis.queues.yml
cp config/redis.shared_state.yml.example config/redis.shared_state.yml
sed -i 's/localhost/redis/g' config/redis.shared_state.yml
-# Some tasks (e.g. db:seed_fu) need to have a properly-configured database
-# user but not necessarily a full schema loaded
-if [ "$CREATE_DB_USER" != "false" ]; then
- if [ "$GITLAB_DATABASE" = 'postgresql' ]; then
- . scripts/create_postgres_user.sh
- else
- . scripts/create_mysql_user.sh
- fi
-fi
-
if [ "$SETUP_DB" != "false" ]; then
- bundle exec rake db:drop db:create db:schema:load db:migrate
-
- if [ "$GITLAB_DATABASE" = "mysql" ]; then
- bundle exec rake add_limits_mysql
- fi
+ setup_db
+elif getent hosts postgres || getent hosts mysql; then
+ setup_db_user_only
fi