summaryrefslogtreecommitdiff
path: root/scripts/prepare_build.sh
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-05-18 17:25:24 +0100
committerFilipa Lacerda <filipa@gitlab.com>2018-05-18 17:25:24 +0100
commit7f0f8594d3e5cbee41771c476e3b7496946db300 (patch)
tree1981c15675409386908b3b05d4f1aa75b1755957 /scripts/prepare_build.sh
parent068186555cb85e85bbfe04afe858fb3eb4801207 (diff)
parent8bacfbd1cc4f6c3678d50dd516df2b59eb0c8864 (diff)
downloadgitlab-ce-5845-extract-ee-environments-files.tar.gz
Merge branch 'master' into 5845-extract-ee-environments-files5845-extract-ee-environments-files
* master: (69 commits) Calculating repository checksums executed by Gitaly Resolve "Expand API: Render an arbitrary Markdown document" Update EE > CE downgrade service removal steps Make stores export a createStore() which can be used in tests Simplify pattern lexeme fabrication and matcher Simplify untrusted regexp factory method Fix api_json.log not always reporting the right HTTP status code Move group lists css from framework/lists.scss to pages/groups.scss Resolve "Web IDE: Previewing Markdown in Firefox doesn’t show a scroll bar" Add Keyboard shortcuts for "Kubernetes" and "Environments" Move API group deletion to Sidekiq fix typos. add a reference to deliverable and stretch for design artifact fix / assigne username wrapping problem has been fixed Memoize Gitlab::Database.version Conditionally add Gitaly deprecation warnings based on ENV variable Bring CE-EE parity to app/services/milestones/base_service.rb Bring CE-EE parity to app/services/lfs/unlock_file_service.rb Fixes 500 error on /estimate BIG_VALUE Fix: Use case in-sensitive ordering by name for groups Fix group lists visual ...
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