summaryrefslogtreecommitdiff
path: root/scripts/prepare_build.sh
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-05-19 16:20:48 +0100
committerFilipa Lacerda <filipa@gitlab.com>2017-05-19 16:20:48 +0100
commit4d9ad9f93c5818a181e4feba47f97212327ac087 (patch)
tree9b0d7fb8f053b89c41417f0c21aca42cd478dc41 /scripts/prepare_build.sh
parent4d8f98693726b54d0e1c384a641e9aa6627fdf41 (diff)
parent60d5063d15fd43f89d5b4ebf379d7a64768a0953 (diff)
downloadgitlab-ce-24339-job-page.tar.gz
Merge branch 'master' into 24339-job-page24339-job-page
* master: (190 commits) Replaced duplicate z-index with index of 400 Enable RSpec profiling only if RSPEC_PROFILING_POSTGRES_URL is not empty Add descriptions for the RSpec/EmptyExampleGroup and RSpec/ExpectOutput cops Add note about artifacts previewing in docs MRWidget: Make error message bold and red. Fixes the 500 for custom apearance header logo and logo MRWidget: Change refresh button place in failed state. Remove readme project_view option Update prometheus documentation Fix JavaScript translations that are using a namespace MRWidget: Add refresh button into MR widget failed state. Add s selectors for supported avatars. Render plain README using Markup viewer so it is displayed below tree Add docs on how to turn off SSL verification on GH oauth Fix clicking disabled clipboard button toolip Stop MR conflict code from blowing up when branches are missing Update edit.html.haml Closes #32555 Fixes per feedback on user avatar components. Consolidate user avatar Vue logic Fixes for the rename reserved paths helpers ...
Diffstat (limited to 'scripts/prepare_build.sh')
-rw-r--r--scripts/prepare_build.sh30
1 files changed, 15 insertions, 15 deletions
diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh
index c727a0e2d88..03de59f27ad 100644
--- a/scripts/prepare_build.sh
+++ b/scripts/prepare_build.sh
@@ -4,9 +4,22 @@ export SETUP_DB=${SETUP_DB:-true}
export USE_BUNDLE_INSTALL=${USE_BUNDLE_INSTALL:-true}
export BUNDLE_INSTALL_FLAGS="--without production --jobs $(nproc) --path vendor --retry 3 --quiet"
+if [ "$USE_BUNDLE_INSTALL" != "false" ]; then
+ bundle install --clean $BUNDLE_INSTALL_FLAGS && bundle check
+fi
+
+# Only install knapsack after bundle install! Otherwise oddly some native
+# gems could not be found under some circumstance. No idea why, hours wasted.
+retry gem install knapsack fog-aws mime-types
+
+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
+
# Determine the database by looking at the job name.
-# For example, we'll get pg if the job is `rspec pg 19 20`
-export GITLAB_DATABASE=$(echo $CI_JOB_NAME | cut -f2 -d' ')
+# For example, we'll get pg if the job is `rspec-pg 19 20`
+export GITLAB_DATABASE=$(echo $CI_JOB_NAME | cut -f1 -d' ' | cut -f2 -d-)
# This would make the default database postgresql, and we could also use
# pg to mean postgresql.
@@ -24,19 +37,6 @@ else # Assume it's mysql
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
- bundle install --clean $BUNDLE_INSTALL_FLAGS && bundle check
-fi
-
-# Only install knapsack after bundle install! Otherwise oddly some native
-# gems could not be found under some circumstance. No idea why, hours wasted.
-retry gem install knapsack fog-aws mime-types
-
if [ "$SETUP_DB" != "false" ]; then
bundle exec rake db:drop db:create db:schema:load db:migrate