summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-04-12 16:11:35 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-04-12 16:11:35 +0800
commit330292518ec9e5839eb85fbf0ae5887ec8b6b081 (patch)
treeca7ee936a5c70347dba17a09051443b5fd6e237d /scripts
parenteeb89a6010fce509f0cb6735e1ae9dc3cc5336d1 (diff)
parentd59f48987baceb25aa87dc6d87551f68af4bb1ed (diff)
downloadgitlab-ce-330292518ec9e5839eb85fbf0ae5887ec8b6b081.tar.gz
Merge remote-tracking branch 'upstream/master' into test-pg-mysql
* upstream/master: (90 commits) Fixed notebooklab code including file paths [BB Importer] Save the error trace and the whole raw document Statisfy Robertcop and Seancop Update documents according to: Update licenses.csv via: Update templates via: Add foreign key on trigger requests Added CHANGELOG Added tests and fixed a typo Fix typo on the class merge-when-pipeline_succeeds Axil's review remove unnecessary line typo fix typo fix links Remove an unused `cared` scope from Issue and MergeRequest Remove an unused `Issue.open_for` scope add topic: authentication Fix edit button on blame page without repo perms Don't show 'Copy content' button on text files that are not rendered as text ...
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/prepare_build.sh35
1 files changed, 13 insertions, 22 deletions
diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh
index 81fdf753c4e..b176830ffb4 100755
--- a/scripts/prepare_build.sh
+++ b/scripts/prepare_build.sh
@@ -10,30 +10,19 @@ if [ "$GITLAB_DATABASE" != 'mysql' ]; then
export GITLAB_DATABASE='postgresql'
fi
-if [ -f /.dockerenv ] || [ -f ./dockerinit ]; then
- cp config/database.yml.$GITLAB_DATABASE config/database.yml
-
- if [ "$GITLAB_DATABASE" = 'postgresql' ]; then
- sed -i 's/# host:.*/host: postgres/g' config/database.yml
- else # Assume it's mysql
- sed -i 's/username:.*/username: root/g' config/database.yml
- sed -i 's/password:.*/password:/g' config/database.yml
- sed -i 's/# host:.*/host: mysql/g' config/database.yml
- fi
-
- cp config/resque.yml.example config/resque.yml
- sed -i 's/localhost/redis/g' config/resque.yml
-
- export FLAGS="--path vendor --retry 3 --quiet"
-else
- rnd=$(awk 'BEGIN { srand() ; printf("%d\n",rand()*5) }')
- export PATH="$HOME/bin:/usr/local/bin:/usr/bin:/bin"
- cp config/database.yml.$GITLAB_DATABASE config/database.yml
- sed "s/username\:.*$/username\: runner/" -i config/database.yml
- sed "s/password\:.*$/password\: 'password'/" -i config/database.yml
- sed "s/gitlabhq_test/gitlabhq_test_$rnd/" -i config/database.yml
+cp config/database.yml.$GITLAB_DATABASE config/database.yml
+
+if [ "$GITLAB_DATABASE" = 'postgresql' ]; then
+ sed -i 's/# host:.*/host: postgres/g' config/database.yml
+else # Assume it's mysql
+ sed -i 's/username:.*/username: root/g' config/database.yml
+ sed -i 's/password:.*/password:/g' config/database.yml
+ sed -i 's/# host:.*/host: mysql/g' config/database.yml
fi
+cp config/resque.yml.example config/resque.yml
+sed -i 's/localhost/redis/g' config/resque.yml
+
cp config/gitlab.yml.example config/gitlab.yml
if [ "$USE_BUNDLE_INSTALL" != "false" ]; then
@@ -51,3 +40,5 @@ if [ "$SETUP_DB" != "false" ]; then
bundle exec rake add_limits_mysql
fi
fi
+
+export FLAGS="--path vendor --retry 3 --quiet"