mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-17 10:36:34 +02:00
build: remove DOCKER_REGISTRY_ARCH_EXCLUSIONS logic
This mechanism was introduced to skip pushing riscv64 images to registries that were misconfigured to not accept that architecture. The misconfiguration has now been fixed across all repositories, so this workaround is no longer needed. Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
This commit is contained in:
parent
de717d30c2
commit
7f31983569
@ -92,7 +92,6 @@ endif
|
||||
|
||||
DOCKER_ARCHS ?= amd64 arm64 armv7 ppc64le riscv64 s390x
|
||||
DOCKERFILE_ARCH_EXCLUSIONS ?=
|
||||
DOCKER_REGISTRY_ARCH_EXCLUSIONS ?=
|
||||
DOCKERFILE_VARIANTS ?= $(wildcard Dockerfile Dockerfile.*)
|
||||
|
||||
# Function to extract variant from Dockerfile label.
|
||||
@ -119,16 +118,6 @@ case " $(DOCKERFILE_ARCH_EXCLUSIONS) " in \
|
||||
esac
|
||||
endef
|
||||
|
||||
# Shell helper to check whether a registry/arch pair is excluded.
|
||||
# Extracts registry from DOCKER_REPO (e.g., quay.io/prometheus -> quay.io)
|
||||
define registry_arch_is_excluded
|
||||
registry=$$(echo "$(DOCKER_REPO)" | cut -d'/' -f1); \
|
||||
case " $(DOCKER_REGISTRY_ARCH_EXCLUSIONS) " in \
|
||||
*" $$registry:$(1) "*) true ;; \
|
||||
*) false ;; \
|
||||
esac
|
||||
endef
|
||||
|
||||
BUILD_DOCKER_ARCHS = $(addprefix common-docker-,$(DOCKER_ARCHS))
|
||||
PUBLISH_DOCKER_ARCHS = $(addprefix common-docker-publish-,$(DOCKER_ARCHS))
|
||||
TAG_DOCKER_ARCHS = $(addprefix common-docker-tag-latest-,$(DOCKER_ARCHS))
|
||||
@ -312,10 +301,6 @@ $(PUBLISH_DOCKER_ARCHS): common-docker-publish-%:
|
||||
echo "Skipping push for $$variant_name variant on linux-$* (excluded by DOCKERFILE_ARCH_EXCLUSIONS)"; \
|
||||
continue; \
|
||||
fi; \
|
||||
if $(call registry_arch_is_excluded,$*); then \
|
||||
echo "Skipping push for $$variant_name variant on linux-$* to $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)"; \
|
||||
continue; \
|
||||
fi; \
|
||||
if [ "$$dockerfile" != "Dockerfile" ] || [ "$$variant_name" != "default" ]; then \
|
||||
echo "Pushing $$variant_name variant for linux-$*"; \
|
||||
docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name"; \
|
||||
@ -347,10 +332,6 @@ $(TAG_DOCKER_ARCHS): common-docker-tag-latest-%:
|
||||
echo "Skipping tag for $$variant_name variant on linux-$* (excluded by DOCKERFILE_ARCH_EXCLUSIONS)"; \
|
||||
continue; \
|
||||
fi; \
|
||||
if $(call registry_arch_is_excluded,$*); then \
|
||||
echo "Skipping tag for $$variant_name variant on linux-$* for $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)"; \
|
||||
continue; \
|
||||
fi; \
|
||||
if [ "$$dockerfile" != "Dockerfile" ] || [ "$$variant_name" != "default" ]; then \
|
||||
echo "Tagging $$variant_name variant for linux-$* as latest"; \
|
||||
docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest-$$variant_name"; \
|
||||
@ -376,10 +357,6 @@ common-docker-manifest:
|
||||
echo " Skipping $$arch for $$variant_name (excluded by DOCKERFILE_ARCH_EXCLUSIONS)"; \
|
||||
continue; \
|
||||
fi; \
|
||||
if $(call registry_arch_is_excluded,$$arch); then \
|
||||
echo " Skipping $$arch for $$variant_name on $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)"; \
|
||||
continue; \
|
||||
fi; \
|
||||
refs="$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name"; \
|
||||
done; \
|
||||
if [ -z "$$refs" ]; then \
|
||||
@ -397,10 +374,6 @@ common-docker-manifest:
|
||||
echo " Skipping $$arch for default variant (excluded by DOCKERFILE_ARCH_EXCLUSIONS)"; \
|
||||
continue; \
|
||||
fi; \
|
||||
if $(call registry_arch_is_excluded,$$arch); then \
|
||||
echo " Skipping $$arch for default variant on $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)"; \
|
||||
continue; \
|
||||
fi; \
|
||||
refs="$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:$(SANITIZED_DOCKER_IMAGE_TAG)"; \
|
||||
done; \
|
||||
if [ -z "$$refs" ]; then \
|
||||
@ -419,10 +392,6 @@ common-docker-manifest:
|
||||
echo " Skipping $$arch for $$variant_name version tag (excluded by DOCKERFILE_ARCH_EXCLUSIONS)"; \
|
||||
continue; \
|
||||
fi; \
|
||||
if $(call registry_arch_is_excluded,$$arch); then \
|
||||
echo " Skipping $$arch for $$variant_name version tag on $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)"; \
|
||||
continue; \
|
||||
fi; \
|
||||
refs="$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name"; \
|
||||
done; \
|
||||
if [ -z "$$refs" ]; then \
|
||||
@ -440,10 +409,6 @@ common-docker-manifest:
|
||||
echo " Skipping $$arch for default variant version tag (excluded by DOCKERFILE_ARCH_EXCLUSIONS)"; \
|
||||
continue; \
|
||||
fi; \
|
||||
if $(call registry_arch_is_excluded,$$arch); then \
|
||||
echo " Skipping $$arch for default variant version tag on $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)"; \
|
||||
continue; \
|
||||
fi; \
|
||||
refs="$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:v$(DOCKER_MAJOR_VERSION_TAG)"; \
|
||||
done; \
|
||||
if [ -z "$$refs" ]; then \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user