Always use . and add more comments to prepare_build.sh
This commit is contained in:
parent
e1bc7577a4
commit
11ef3154bb
|
@ -431,7 +431,7 @@ bundler:audit:
|
||||||
- bundle exec rake db:drop db:create db:schema:load db:seed_fu
|
- bundle exec rake db:drop db:create db:schema:load db:seed_fu
|
||||||
- git checkout $CI_COMMIT_SHA
|
- git checkout $CI_COMMIT_SHA
|
||||||
- bundle install --without production --jobs $(nproc) $FLAGS --retry=3
|
- bundle install --without production --jobs $(nproc) $FLAGS --retry=3
|
||||||
- source scripts/prepare_build.sh
|
- . scripts/prepare_build.sh
|
||||||
- bundle exec rake db:migrate
|
- bundle exec rake db:migrate
|
||||||
|
|
||||||
migration pg paths:
|
migration pg paths:
|
||||||
|
|
|
@ -3,9 +3,14 @@
|
||||||
. scripts/utils.sh
|
. scripts/utils.sh
|
||||||
|
|
||||||
export SETUP_DB=${SETUP_DB:-true}
|
export SETUP_DB=${SETUP_DB:-true}
|
||||||
export GITLAB_DATABASE=$(echo $CI_JOB_NAME | cut -f2 -d' ')
|
|
||||||
export USE_BUNDLE_INSTALL=${USE_BUNDLE_INSTALL:-true}
|
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
|
if [ "$GITLAB_DATABASE" != 'mysql' ]; then
|
||||||
export GITLAB_DATABASE='postgresql'
|
export GITLAB_DATABASE='postgresql'
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue