Files
Myasnikov Daniil a9a66bf066 build(linstor): use shared BUILDX_ARGS for linstor-gui image build
The per-package Makefile added in #2382 hardcoded buildx flags
(--provenance, --builder, --platform=linux/amd64,linux/arm64,
--push, --load, --label) instead of using the shared $(BUILDX_ARGS)
macro from hack/common-envs.mk.

This broke CI: the runner's default docker driver does not support
multi-platform builds, and the hardcoded multi-arch platform list
crashed `make build` with "Multi-platform build is not supported for
the docker driver."

Replace the hardcoded flags with $(BUILDX_ARGS) to match every other
package (e.g. linstor, dashboard, cilium). $(BUILDX_ARGS) injects
--push, --load, --label, --provenance=false, and only sets --builder
or --platform when the operator explicitly exports BUILDER/PLATFORM.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-04-27 17:31:07 +05:00

30 lines
966 B
Makefile

export NAME=linstor-gui
export NAMESPACE=cozy-linstor
include ../../../hack/common-envs.mk
include ../../../hack/package.mk
LINSTOR_GUI_VERSION ?= 2.3.0
.PHONY: image image-linstor-gui test
image: image-linstor-gui
image-linstor-gui:
docker buildx build images/linstor-gui \
--build-arg LINSTOR_GUI_VERSION=$(LINSTOR_GUI_VERSION) \
--tag $(REGISTRY)/linstor-gui:$(call settag,$(LINSTOR_GUI_VERSION)) \
--tag $(REGISTRY)/linstor-gui:$(call settag,$(LINSTOR_GUI_VERSION)-$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/linstor-gui:latest \
--cache-to type=inline \
--metadata-file images/linstor-gui.json \
$(BUILDX_ARGS)
REPOSITORY="$(REGISTRY)/linstor-gui" \
yq -i '.image.repository = strenv(REPOSITORY)' values.yaml
TAG="$(call settag,$(LINSTOR_GUI_VERSION))@$$(yq e '."containerimage.digest"' images/linstor-gui.json -o json -r)" \
yq -i '.image.tag = strenv(TAG)' values.yaml
rm -f images/linstor-gui.json
test:
helm unittest .