File tree 3 files changed +23
-16
lines changed
3 files changed +23
-16
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ services:
20
20
MYSQL_PASSWORD : ' npmpass'
21
21
volumes :
22
22
- mysql_vol:/var/lib/mysql
23
+ networks :
24
+ - fulltest
23
25
24
26
volumes :
25
27
mysql_vol :
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ services:
20
20
interval : 10s
21
21
timeout : 3s
22
22
networks :
23
- default :
23
+ fulltest :
24
24
aliases :
25
25
- website1.example.com
26
26
- website2.example.com
@@ -32,7 +32,7 @@ services:
32
32
- ' ./dev/resolv.conf:/etc/resolv.conf:ro'
33
33
- ' /etc/localtime:/etc/localtime:ro'
34
34
networks :
35
- default :
35
+ fulltest :
36
36
aliases :
37
37
- ca.internal
38
38
@@ -59,7 +59,7 @@ services:
59
59
depends_on :
60
60
- pdns-db
61
61
networks :
62
- default :
62
+ fulltest :
63
63
aliases :
64
64
- ns1.pdns
65
65
- ns2.pdns
@@ -75,11 +75,15 @@ services:
75
75
- ' pdns_mysql_vol:/var/lib/mysql'
76
76
- ' /etc/localtime:/etc/localtime:ro'
77
77
- ' ./dev/pdns-db.sql:/docker-entrypoint-initdb.d/01_init.sql:ro'
78
+ networks :
79
+ - fulltest
78
80
79
81
dnsrouter :
80
82
image : jc21/dnsrouter
81
83
volumes :
82
84
- ./dev/dnsrouter-config.json.tmp:/dnsrouter-config.json:ro
85
+ networks :
86
+ - fulltest
83
87
84
88
cypress :
85
89
image : " ${IMAGE}-cypress:ci-${BUILD_NUMBER}"
@@ -92,9 +96,15 @@ services:
92
96
- ' cypress_logs:/results'
93
97
- ' ./dev/resolv.conf:/etc/resolv.conf:ro'
94
98
command : cypress run --browser chrome --config-file=cypress/config/ci.js
99
+ networks :
100
+ - fulltest
95
101
96
102
volumes :
97
103
cypress_logs :
98
104
npm_data_ci :
99
105
npm_le_ci :
100
106
pdns_mysql_vol :
107
+
108
+ networks :
109
+ fulltest :
110
+ name : " npm-${BRANCH_LOWER}-ci-${BUILD_NUMBER}"
Original file line number Diff line number Diff line change 18
18
19
19
# Colors
20
20
BLUE=' \E[1;34m'
21
+ RED=' \E[1;31m'
21
22
CYAN=' \E[1;36m'
22
23
GREEN=' \E[1;32m'
23
24
RESET=' \E[0m'
@@ -26,26 +27,15 @@ YELLOW='\E[1;33m'
26
27
export BLUE CYAN GREEN RESET YELLOW
27
28
28
29
echo -e " ${BLUE} ❯ ${CYAN} Starting fullstack cypress testing ...${RESET} "
29
-
30
- NETWORK_NAME=" ${COMPOSE_PROJECT_NAME} _default"
30
+ echo -e " ${BLUE} ❯ $( docker-compose config) ${RESET} "
31
31
32
32
# $1: container_name
33
33
get_container_ip () {
34
34
local container_name=$1
35
35
local container
36
36
local ip
37
37
container=$( docker-compose ps --all -q " ${container_name} " | tail -n1)
38
- ip=$( docker inspect -f " {{.NetworkSettings.Networks.${NETWORK_NAME} .IPAddress}}" " $container " )
39
- echo " $ip "
40
- }
41
-
42
- # $1: container_name
43
- get_container_aliases () {
44
- local container_name=$1
45
- local container
46
- local ip
47
- container=$( docker-compose ps --all -q " ${container_name} " | tail -n1)
48
- ip=$( docker inspect -f " {{.NetworkSettings.Networks.${NETWORK_NAME} .Aliases}}" " $container " )
38
+ ip=$( docker inspect --format=' {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' " $container " )
49
39
echo " $ip "
50
40
}
51
41
@@ -64,6 +54,11 @@ docker-compose up -d dnsrouter
64
54
DNSROUTER_IP=$( get_container_ip " dnsrouter" )
65
55
echo -e " ${BLUE} ❯ ${YELLOW} DNS Router IP is ${DNSROUTER_IP} "
66
56
57
+ if [ " ${DNSROUTER_IP:- } " = " " ]; then
58
+ echo -e " ${RED} ❯ ERROR: DNS Router IP is not set${RESET} "
59
+ exit 1
60
+ fi
61
+
67
62
# mount the resolver
68
63
LOCAL_RESOLVE=" $DIR /../../docker/dev/resolv.conf"
69
64
rm -rf " ${LOCAL_RESOLVE} "
You can’t perform that action at this time.
0 commit comments