diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/prepare_build.sh | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh index 5fca95f1f40..9b0d5d4f719 100644 --- a/scripts/prepare_build.sh +++ b/scripts/prepare_build.sh @@ -17,12 +17,10 @@ cp config/gitlab.yml.example config/gitlab.yml sed -i 's/bin_path: \/usr\/bin\/git/bin_path: \/usr\/local\/bin\/git/' 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 -f1 -d' ' | cut -f2 -d-) - -# This would make the default database postgresql, and we could also use -# pg to mean postgresql. -if [ "$GITLAB_DATABASE" != 'mysql' ]; then +# This would make the default database postgresql. +if [[ "${CI_JOB_NAME#*mysql}" != "$CI_JOB_NAME" ]]; then + export GITLAB_DATABASE='mysql' +else export GITLAB_DATABASE='postgresql' fi |