Commit c78f03ae authored by Lin Jen-Shin's avatar Lin Jen-Shin

We cannot use array in yaml variables

parent 76e7d256
...@@ -7,7 +7,6 @@ cache: ...@@ -7,7 +7,6 @@ cache:
variables: variables:
MYSQL_ALLOW_EMPTY_PASSWORD: "1" MYSQL_ALLOW_EMPTY_PASSWORD: "1"
GITLAB_DATABASE: $CI_JOB_NAME[1]
RAILS_ENV: "test" RAILS_ENV: "test"
NODE_ENV: "test" NODE_ENV: "test"
SIMPLECOV: "true" SIMPLECOV: "true"
......
...@@ -2,11 +2,15 @@ ...@@ -2,11 +2,15 @@
. scripts/utils.sh . 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 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} export USE_BUNDLE_INSTALL=${USE_BUNDLE_INSTALL:-true}
if [ "$GITLAB_DATABASE" = 'pg' ]; then if [ "$GITLAB_DATABASE" != 'mysql' ]; then
export GITLAB_DATABASE='postgresql' export GITLAB_DATABASE='postgresql'
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment