File tree Expand file tree Collapse file tree 3 files changed +9
-13
lines changed Expand file tree Collapse file tree 3 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,11 @@ pipeline {
2929 DIST_IMAGE = ' alpine'
3030 MULTIARCH = ' true'
3131 CI = ' true'
32- CI_WEB = ' true '
32+ CI_WEB = ' false '
3333 CI_PORT = ' 80'
3434 CI_SSL = ' false'
3535 CI_DELAY = ' 120'
36- TEST_MYSQL_HOST = credentials(' mysql_test_host' )
37- TEST_MYSQL_PASSWORD = credentials(' mysql_test_password' )
38- CI_DOCKERENV = ' DB_HOST=${TEST_MYSQL_HOST}|DB_DATABASE=bookstack|DB_USERNAME=root|DB_PASSWORD=${TEST_MYSQL_PASSWORD}'
36+ CI_DOCKERENV = ' CI_RUN=true'
3937 CI_AUTH = ' user:password'
4038 CI_WEBPATH = ' '
4139 }
Original file line number Diff line number Diff line change @@ -20,12 +20,10 @@ repo_vars:
2020 - DIST_IMAGE = 'alpine'
2121 - MULTIARCH = 'true'
2222 - CI = 'true'
23- - CI_WEB = 'true '
23+ - CI_WEB = 'false '
2424 - CI_PORT = '80'
2525 - CI_SSL = 'false'
2626 - CI_DELAY = '120'
27- - TEST_MYSQL_HOST = credentials('mysql_test_host')
28- - TEST_MYSQL_PASSWORD = credentials('mysql_test_password')
29- - CI_DOCKERENV = 'DB_HOST=${TEST_MYSQL_HOST}|DB_DATABASE=bookstack|DB_USERNAME=root|DB_PASSWORD=${TEST_MYSQL_PASSWORD}'
27+ - CI_DOCKERENV = 'CI_RUN=true'
3028 - CI_AUTH = 'user:password'
3129 - CI_WEBPATH = ''
Original file line number Diff line number Diff line change 5757
5858# check for the mysql endpoint for 30 seconds
5959END=$((SECONDS+30))
60- while [ ${SECONDS} -lt ${END} ] && [ "${DB_HOST}" ];
61- do
60+ while [ ${SECONDS} -lt ${END} ] && [ -n "${DB_HOST+x}" ]; do
6261 /usr/bin/nc -z ${DB_HOST} 3306 && \
63- if [ ! -z "$(/usr/bin/nc -w1 ${DB_HOST} 3306)" ];
64- then
62+ if [ ! -z "$(/usr/bin/nc -w1 ${DB_HOST} 3306)" ]; then
6563 [ ! -z "${RUN}" ] && break
6664 RUN="RAN"
6765 # we sleep here again due to first run init on DB containers
@@ -73,7 +71,9 @@ while [ ${SECONDS} -lt ${END} ] && [ "${DB_HOST}" ];
7371done
7472
7573# update database - will set up database if fresh, or, migrate existing
76- php /var/www/html/artisan migrate --force
74+ if [ -z "${CI_RUN+x}" ]; then
75+ php /var/www/html/artisan migrate --force
76+ fi
7777
7878# set permissions
7979chown -R abc:abc \
You can’t perform that action at this time.
0 commit comments