mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-09 05:25:14 +09:00
Address non-blocking review feedback from lexfrei on packages/system/dashboard/Makefile:34. When COZYSTACK_VERSION is empty (a local build with no matching git tag) the build-arg baked a bare `APP_VERSION=v` into the console bundle. Match the guard the root Makefile already uses for platformVersion so an empty version yields an empty APP_VERSION instead of "v". Dev-only cosmetics — the config.json path overrides the displayed version at deploy time — but it removes the mismatch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
58 lines
1.9 KiB
Makefile
58 lines
1.9 KiB
Makefile
export NAME=dashboard
|
|
export NAMESPACE=cozy-$(NAME)
|
|
|
|
include ../../../hack/common-envs.mk
|
|
include ../../../hack/package.mk
|
|
|
|
.PHONY: image image-console image-token-proxy test test-go test-helm
|
|
.PHONY: build-console update-values-console
|
|
.NOTPARALLEL: image
|
|
|
|
test: test-helm test-go
|
|
|
|
test-helm:
|
|
helm unittest .
|
|
|
|
test-go:
|
|
cd images/token-proxy && go test ./...
|
|
|
|
image: image-console image-token-proxy
|
|
|
|
image-console: build-console update-values-console
|
|
|
|
# Console source lives in-tree under images/console (vendored from the former
|
|
# cozystack-ui repo). Build from that context directly — no clone step.
|
|
build-console:
|
|
docker buildx build images/console \
|
|
--file images/console/Containerfile \
|
|
--provenance false \
|
|
--builder=$(BUILDER) \
|
|
--platform=linux/amd64 \
|
|
$(call image-tags,cozystack-ui,v$(COZYSTACK_VERSION)) \
|
|
$(call cache-args,cozystack-ui) \
|
|
--metadata-file images/console.json \
|
|
--build-arg APP_VERSION=$(if $(COZYSTACK_VERSION),v$(COZYSTACK_VERSION),) \
|
|
--push=$(PUSH) \
|
|
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
|
|
--load=$(LOAD)
|
|
|
|
update-values-console:
|
|
IMAGE="$(REGISTRY)/cozystack-ui:$(IMAGE_TAG)@$$(yq e '."containerimage.digest"' images/console.json -r)" \
|
|
yq -i '.console.image = strenv(IMAGE)' values.yaml
|
|
rm -f images/console.json
|
|
|
|
image-token-proxy:
|
|
docker buildx build images/token-proxy \
|
|
--provenance false \
|
|
--builder=$(BUILDER) \
|
|
--platform=linux/amd64 \
|
|
$(call image-tags,token-proxy,v$(COZYSTACK_VERSION)) \
|
|
$(call cache-args,token-proxy) \
|
|
--metadata-file images/token-proxy.json \
|
|
--push=$(PUSH) \
|
|
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
|
|
--load=$(LOAD)
|
|
IMAGE="$(REGISTRY)/token-proxy:$(IMAGE_TAG)@$$(yq e '."containerimage.digest"' images/token-proxy.json -r)" \
|
|
yq -i '.tokenProxy.image = strenv(IMAGE)' values.yaml
|
|
rm -f images/token-proxy.json
|