File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 98
98
HOST_ADDR : ${{ env.HOST_IP_ADDR }}
99
99
- name : Wait for nodes to be ready
100
100
run : |
101
- node_cnt=$(docker compose -f $DOCKER_COMPOSE_FILE ps | tail -n +2 | wc -l )
101
+ node_cnt=$(docker compose -f $DOCKER_COMPOSE_FILE ps --format json | jq -s 'length' )
102
102
i=0
103
103
while :
104
104
do
@@ -107,7 +107,7 @@ jobs:
107
107
echo "Max attempts exceeded: $i times"
108
108
exit 1
109
109
fi
110
- healthy_cnt=$(docker compose -f $DOCKER_COMPOSE_FILE ps --format json | ( jq .[].Status || true) | (grep healthy || true) | wc -l )
110
+ healthy_cnt=$(docker compose -f $DOCKER_COMPOSE_FILE ps --format json | jq -s 'map(select(.Health == "healthy")) | length' )
111
111
if [[ $healthy_cnt -eq $node_cnt ]]
112
112
then
113
113
break
@@ -117,7 +117,7 @@ jobs:
117
117
: $((++i))
118
118
done
119
119
env :
120
- MAX_ATTEMPTS : " 20 "
120
+ MAX_ATTEMPTS : " 10 "
121
121
- name : Print containers
122
122
run : docker compose -f $DOCKER_COMPOSE_FILE ps
123
123
- name : Build cluster
You can’t perform that action at this time.
0 commit comments