summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-05-24 15:34:54 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2019-05-24 15:34:54 +0000
commit21c809ce224696a811d6a557c601e6dc2eb27d2f (patch)
treef575dd5e531bc14a866c3be86ae902adab42ddc8 /scripts
parentc0ea4164cdc21e831fbbfa9dee48a6fa2766d9fc (diff)
parent0c9b9a70f4f9bf6cbdb6df244f6c7532f4d3d532 (diff)
downloadgitlab-ce-21c809ce224696a811d6a557c601e6dc2eb27d2f.tar.gz
Merge branch '62151-broken-master' into 'master'
Fix MySQL CI jobs Closes #62156 and #62151 See merge request gitlab-org/gitlab-ce!28593
Diffstat (limited to 'scripts')
-rw-r--r--scripts/prepare_build.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh
index 58b74f2f07d..9b0d5d4f719 100644
--- a/scripts/prepare_build.sh
+++ b/scripts/prepare_build.sh
@@ -5,6 +5,7 @@ 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 --version
bundle install --clean $BUNDLE_INSTALL_FLAGS && bundle check
fi
@@ -16,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