mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-08 21:14:56 +09:00
## What this PR does Moves the `cozystack-ui` console SPA into this monorepo so the UI versions and ships in lockstep with the platform — removing the cross-repo digest-bump PRs and the version drift between the two repositories. The source is vendored at `packages/system/dashboard/images/console/` via `git subtree`, preserving full upstream history. This mirrors the existing in-tree `images/token-proxy/` pattern, and `.helmignore` already excludes `images/*/*` so the source never enters the Helm chart. **Changes** - **Source**: `cozystack-ui` `main` merged under `packages/system/dashboard/images/console/` (history preserved as a merge parent). - **Build**: `packages/system/dashboard/Makefile` builds the console image from the in-tree context instead of cloning the external repo at build time. Dropped `clone-console`/`clean-console` and the `CONSOLE_REPO`/`CONSOLE_BRANCH` variables. The built digest is still pinned into `values.yaml` by `update-values-console` — now in the same commit as the source change rather than a separate follow-up PR. - **CI**: new `.github/workflows/ui-test.yaml` runs pnpm typecheck + unit tests, path-gated to `images/console/**`. The container image continues to build via `make build`. **Verification** - `pnpm install --frozen-lockfile` → `pnpm typecheck` clean → production build produces `dist/`. - 313 unit tests pass. - `helm template` renders; console + token-proxy image references unchanged. **Follow-ups (after merge)** - Archive the standalone `cozystack-ui` repository and redirect contributions here. - Update remaining documentation pointers that reference the old repo path. ### Screenshots N/A — no UI behavior change. This relocates the UI source and rewires the build; the shipped image and digest are unchanged. ### Release note ```release-note build(dashboard): vendor the cozystack-ui console into the monorepo and build it from in-tree source; the shipped image and digest are unchanged for cluster operators ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
58 lines
1.8 KiB
Makefile
58 lines
1.8 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=$(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
|