File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -119,31 +119,9 @@ jobs:
119119 - name : Pull Docker images
120120 run : docker compose --progress quiet -f $DOCKER_COMPOSE_FILE pull
121121 - name : Run containers
122- run : docker compose --progress quiet -f $DOCKER_COMPOSE_FILE up -d
122+ run : docker compose --progress quiet -f $DOCKER_COMPOSE_FILE up --wait --wait-timeout 30
123123 env :
124124 HOST_ADDR : ${{ env.HOST_IP_ADDR }}
125- - name : Wait for nodes to be ready
126- run : |
127- node_cnt=$(docker compose -f $DOCKER_COMPOSE_FILE ps --format json | jq -s 'length')
128- i=0
129- while :
130- do
131- if [[ $i -gt $MAX_ATTEMPTS ]]
132- then
133- echo "Max attempts exceeded: $i times"
134- exit 1
135- fi
136- healthy_cnt=$(docker compose -f $DOCKER_COMPOSE_FILE ps --format json | jq -s 'map(select(.Health == "healthy")) | length')
137- if [[ $healthy_cnt -eq $node_cnt ]]
138- then
139- break
140- fi
141- echo 'Waiting for nodes to be ready...'
142- sleep 3
143- : $((++i))
144- done
145- env :
146- MAX_ATTEMPTS : " 10"
147125 - name : Print containers
148126 run : docker compose -f $DOCKER_COMPOSE_FILE ps
149127 - name : Build cluster
You can’t perform that action at this time.
0 commit comments