diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-04-13 15:48:25 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-04-13 15:48:25 +0800 |
commit | 11ef3154bbd7073a3083e05a79f4bf022ccd6859 (patch) | |
tree | e6f5d29710e8a0809eefb672ef6ca2bf373b8132 | |
parent | e1bc7577a4b83f729fae02c1fbdac9d066c93a51 (diff) | |
download | gitlab-ce-11ef3154bbd7073a3083e05a79f4bf022ccd6859.tar.gz |
Always use . and add more comments to prepare_build.sh
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rwxr-xr-x | scripts/prepare_build.sh | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2807274cb13..6ffc60dc6a0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -431,7 +431,7 @@ bundler:audit: - bundle exec rake db:drop db:create db:schema:load db:seed_fu - git checkout $CI_COMMIT_SHA - bundle install --without production --jobs $(nproc) $FLAGS --retry=3 - - source scripts/prepare_build.sh + - . scripts/prepare_build.sh - bundle exec rake db:migrate migration pg paths: diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh index b176830ffb4..8c5ffe92960 100755 --- a/scripts/prepare_build.sh +++ b/scripts/prepare_build.sh @@ -3,9 +3,14 @@ . scripts/utils.sh export SETUP_DB=${SETUP_DB:-true} -export GITLAB_DATABASE=$(echo $CI_JOB_NAME | cut -f2 -d' ') export USE_BUNDLE_INSTALL=${USE_BUNDLE_INSTALL:-true} +# 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' ') + +# This would make the default database postgresql, and we could also use +# pg to mean postgresql. if [ "$GITLAB_DATABASE" != 'mysql' ]; then export GITLAB_DATABASE='postgresql' fi |