diff --git a/Makefile b/Makefile index 504f93c..530ca49 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,9 @@ # registers the module, /: is the bundle, # //release: is the release image. +empty := +space := $(empty) $(empty) + MODULE ?= cluster-map SOURCE ?= git.project-chimera.ru/fanchji/cluster-map CHANNEL ?= alpha @@ -34,9 +37,15 @@ render: helm template $(MODULE) . --namespace d8-cluster-map $(API_VERSIONS) -f tests/values/default.yaml -f tests/values/no-hubble.yaml > /dev/null @echo render OK -# Deckhouse publishes its base image digests; the same file official modules build from. +# Deckhouse publishes its base image digests; the same file official modules +# build from. .werf/stages/base-images.yaml turns every key into a werf image, +# and the full file has ~1200 of them, so only the keys this module uses are kept. +BASE_IMAGE_KEYS := REGISTRY_PATH builder/golang-alpine builder/alpine builder/scratch base/distroless jq + base_images.yml: - curl -sfL -o $@ "https://fox.flant.com/api/v4/projects/deckhouse%2Fcontainer-base%2Fbase-images/packages/generic/base_images/$(BASE_IMAGES_VERSION)/base_images.yml" + curl -sfL "https://fox.flant.com/api/v4/projects/deckhouse%2Fcontainer-base%2Fbase-images/packages/generic/base_images/$(BASE_IMAGES_VERSION)/base_images.yml" \ + | grep -E '^($(subst $(space),|,$(BASE_IMAGE_KEYS))):' > $@ + @test "$$(wc -l < $@)" -eq $(words $(BASE_IMAGE_KEYS)) || (echo "base_images.yml: expected $(words $(BASE_IMAGE_KEYS)) keys"; cat $@; rm -f $@; exit 1) base-images: base_images.yml