Skip to content
Snippets Groups Projects
Commit ee212a2c authored by Corné Lukken's avatar Corné Lukken
Browse files

L2SS-988: Improve await script in Makefile

parent 2d366c40
Branches
No related tags found
No related merge requests found
...@@ -228,10 +228,13 @@ await: ## Await every container with total max timeout of 300, do not reset tim ...@@ -228,10 +228,13 @@ await: ## Await every container with total max timeout of 300, do not reset tim
time=0 time=0
for i in $(SERVICE); do \ for i in $(SERVICE); do \
current_service=$$($(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) ps -q $${i}); \ current_service=$$($(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) ps -q $${i}); \
while [ "`docker inspect -f {{.State.Health.Status}} $${current_service}`" != "healthy" ] ; do \ if [ -z "$${current_service}" ]; then \
continue; \
fi; \
while [ "$$(docker inspect -f '{{.State.Health.Status}}' $${current_service})" != "healthy" ] ; do \
sleep 1; \ sleep 1; \
time=`expr $$time + 1`; \ time=$$(expr $${time} + 1); \
if [ $${time} -gt $${TIMEOUT} ]; then \ if [ $${time} -gt $(TIMEOUT) ]; then \
echo "Timeout reached waiting for $${i} to become healthy"; \ echo "Timeout reached waiting for $${i} to become healthy"; \
exit 1; \ exit 1; \
fi; \ fi; \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment