1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

Makefile: change poll-image target to poll-images

Poll all images that are supposed to be tagged. Both the "full" and
"minimal" variant, including tags created from IMAGE_EXTRA_TAG_NAMES.
This commit is contained in:
Markus Lehtonen 2021-03-09 12:13:02 +02:00
parent 8fb58a178a
commit c5dca79a07
2 changed files with 13 additions and 10 deletions

View file

@ -148,17 +148,20 @@ push:
$(IMAGE_PUSH_CMD) $(IMAGE_TAG)-minimal
for tag in $(IMAGE_EXTRA_TAGS); do $(IMAGE_PUSH_CMD) $$tag; $(IMAGE_PUSH_CMD) $$tag-minimal; done
poll-image:
poll-images:
set -e; \
image=$(IMAGE_REPO):$(IMAGE_TAG_NAME); \
tags="$(foreach tag,$(IMAGE_TAG_NAME) $(IMAGE_EXTRA_TAG_NAMES),$(tag) $(tag)-minimal)" \
base_url=`echo $(IMAGE_REPO) | sed -e s'!\([^/]*\)!\1/v2!'`; \
errors=`curl -fsS -X GET https://$$base_url/manifests/$(IMAGE_TAG_NAME)|jq .errors`; \
if [ "$$errors" = "null" ]; then \
echo Image $$image found; \
else \
echo Image $$image not found; \
exit 1; \
fi;
for tag in $$tags; do \
image=$(IMAGE_REPO):$$tag \
errors=`curl -fsS -X GET https://$$base_url/manifests/$$tag|jq .errors`; \
if [ "$$errors" = "null" ]; then \
echo Image $$image found; \
else \
echo Image $$image not found; \
exit 1; \
fi; \
done
site-build:
@mkdir -p docs/vendor/bundle

View file

@ -17,7 +17,7 @@ echo "$E2E_TEST_CONFIG_DATA" > "$E2E_TEST_CONFIG"
# Wait for the image to be built and published
i=1
while true; do
if make poll-image; then
if make poll-images; then
break
elif [ $i -ge 10 ]; then
"ERROR: too many tries when polling for image"