summaryrefslogtreecommitdiff
path: root/scripts/prepare_build.sh
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-05-15 01:49:46 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-05-16 21:52:08 +0800
commit0ab6469187285368d9f64f9ec67dbbcfa3e5a901 (patch)
treecc4a30610d5ade08499667c74c8bcc467db4eb25 /scripts/prepare_build.sh
parentcdcde75bb782951b27ab9db0d54a71db7c94d7cb (diff)
downloadgitlab-ce-0ab6469187285368d9f64f9ec67dbbcfa3e5a901.tar.gz
Grant privileges after database is createdce-5980-add-ce-upgrade-ee-test
Never drop the database when granting privileges
Diffstat (limited to 'scripts/prepare_build.sh')
-rw-r--r--scripts/prepare_build.sh12
1 files changed, 2 insertions, 10 deletions
diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh
index 01cb01ed812..d8bcc9f8191 100644
--- a/scripts/prepare_build.sh
+++ b/scripts/prepare_build.sh
@@ -49,16 +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
setup_db
+elif getent hosts postgres || getent hosts mysql; then
+ setup_db_user_only
fi