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 {
29
29
DIST_IMAGE = ' alpine'
30
30
MULTIARCH = ' true'
31
31
CI = ' true'
32
- CI_WEB = ' true '
32
+ CI_WEB = ' false '
33
33
CI_PORT = ' 80'
34
34
CI_SSL = ' false'
35
35
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'
39
37
CI_AUTH = ' user:password'
40
38
CI_WEBPATH = ' '
41
39
}
Original file line number Diff line number Diff line change @@ -20,12 +20,10 @@ repo_vars:
20
20
- DIST_IMAGE = 'alpine'
21
21
- MULTIARCH = 'true'
22
22
- CI = 'true'
23
- - CI_WEB = 'true '
23
+ - CI_WEB = 'false '
24
24
- CI_PORT = '80'
25
25
- CI_SSL = 'false'
26
26
- 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'
30
28
- CI_AUTH = 'user:password'
31
29
- CI_WEBPATH = ''
Original file line number Diff line number Diff line change 57
57
58
58
# check for the mysql endpoint for 30 seconds
59
59
END=$((SECONDS+30))
60
- while [ ${SECONDS} -lt ${END} ] && [ "${DB_HOST}" ];
61
- do
60
+ while [ ${SECONDS} -lt ${END} ] && [ -n "${DB_HOST+x}" ]; do
62
61
/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
65
63
[ ! -z "${RUN}" ] && break
66
64
RUN="RAN"
67
65
# we sleep here again due to first run init on DB containers
@@ -73,7 +71,9 @@ while [ ${SECONDS} -lt ${END} ] && [ "${DB_HOST}" ];
73
71
done
74
72
75
73
# 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
77
77
78
78
# set permissions
79
79
chown -R abc:abc \
You can’t perform that action at this time.
0 commit comments