Skip to content

Commit d568a91

Browse files
committed
Makefile: Use "ifdef" instead of shell condition in the "cluster" target
This appears to break Jenkins with `/bin/sh: 2: [[: not found` error.
1 parent 160c2d8 commit d568a91

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Makefile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -195,18 +195,18 @@ endif
195195
docker.elastic.co/elasticsearch/$(version); \
196196
done \
197197
}
198+
ifdef detached
198199
@{ \
199-
if [[ "$(detached)" == "true" ]]; then \
200-
echo "\033[2m→ Waiting for the cluster...\033[0m"; \
201-
docker run --network elasticsearch --rm appropriate/curl --max-time 120 --retry 120 --retry-delay 1 --retry-connrefused --show-error --silent http://es1:9200; \
202-
output="\033[2m→ Cluster ready; to remove containers:"; \
203-
output="$$output docker rm -f"; \
204-
for n in `seq 1 $(nodes)`; do \
205-
output="$$output es$$n"; \
206-
done; \
207-
echo "$$output\033[0m"; \
208-
fi \
200+
echo "\033[2m→ Waiting for the cluster...\033[0m"; \
201+
docker run --network elasticsearch --rm appropriate/curl --max-time 120 --retry 120 --retry-delay 1 --retry-connrefused --show-error --silent http://es1:9200; \
202+
output="\033[2m→ Cluster ready; to remove containers:"; \
203+
output="$$output docker rm -f"; \
204+
for n in `seq 1 $(nodes)`; do \
205+
output="$$output es$$n"; \
206+
done; \
207+
echo "$$output\033[0m"; \
209208
}
209+
endif
210210

211211
cluster-update: ## Update the Docker image
212212
$(eval version ?= "elasticsearch-oss:8.0.0-SNAPSHOT")

0 commit comments

Comments
 (0)