summaryrefslogtreecommitdiff
path: root/scripts/prepare_build.sh
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-04-10 21:59:53 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-04-11 00:39:19 +0800
commitc78f03ae6ef446e9862e185eba2dc3116b04fdb5 (patch)
treeeb2b556844f4076b2a1b786ff735b71f04187e54 /scripts/prepare_build.sh
parent76e7d2564d30a72604496acf8cd6fb1228905c0f (diff)
downloadgitlab-ce-c78f03ae6ef446e9862e185eba2dc3116b04fdb5.tar.gz
We cannot use array in yaml variables
Diffstat (limited to 'scripts/prepare_build.sh')
-rwxr-xr-xscripts/prepare_build.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh
index 2b041892eab..48b046116e4 100755
--- a/scripts/prepare_build.sh
+++ b/scripts/prepare_build.sh
@@ -2,11 +2,15 @@
. scripts/utils.sh
+echo $CI_JOB_NAME
+job_name=$(echo $CI_JOB_NAME | cut -f2 -d' ')
+echo $job_name
+
export SETUP_DB=${SETUP_DB:-true}
-export GITLAB_DATABASE=${GITLAB_DATABASE:-postgresql}
+export GITLAB_DATABASE=${GITLAB_DATABASE:-$job_name}
export USE_BUNDLE_INSTALL=${USE_BUNDLE_INSTALL:-true}
-if [ "$GITLAB_DATABASE" = 'pg' ]; then
+if [ "$GITLAB_DATABASE" != 'mysql' ]; then
export GITLAB_DATABASE='postgresql'
fi