mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-09 05:25:14 +09:00
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>
30 lines
966 B
Makefile
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 .
|