diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-04-12 16:11:35 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-04-12 16:11:35 +0800 |
commit | 330292518ec9e5839eb85fbf0ae5887ec8b6b081 (patch) | |
tree | ca7ee936a5c70347dba17a09051443b5fd6e237d /scripts | |
parent | eeb89a6010fce509f0cb6735e1ae9dc3cc5336d1 (diff) | |
parent | d59f48987baceb25aa87dc6d87551f68af4bb1ed (diff) | |
download | gitlab-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-x | scripts/prepare_build.sh | 35 |
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" |