Commit Graph

9 Commits (0fdc7f59ebab76a0a7f9cc9279a1f380d3d12e45)

Author SHA1 Message Date
Fadhli Azhari 0fdc7f59eb build(frontend-builder): use pnpm consistently (drop npx/npm install -g)
The image is built around corepack-activated pnpm@10.15.0 but two
install commands were still using npm/npx, which:
- Ignores the pnpm store and creates a separate npm cache (~/.npm)
- Inconsistent with the rest of the image

Replace:
- `npm install -g @bufbuild/protoc-gen-es@X` → `pnpm add -g @bufbuild/protoc-gen-es@X`
- `npx --yes playwright@X install chromium` → `pnpm dlx playwright@X install chromium`

`pnpm add -g` requires PNPM_HOME on PATH (pnpm's interactive `pnpm
setup` does this; we do it explicitly):
  ENV PNPM_HOME=/root/.local/share/pnpm
  ENV PATH="${PNPM_HOME}:${PATH}"

`pnpm dlx` is a transient install — fetches the package into the
store, runs the install command, leaves only the browser binary at
$PLAYWRIGHT_BROWSERS_PATH (which is what we actually want).

No functional change for consumers. Image is just self-consistent now.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 07:26:24 +08:00
Fadhli Azhari 407e72d5ca build(frontend-builder): bake Playwright + chromium browser binary
CI's frontend test-e2e job was running `pnpm exec playwright install
chromium` every time — ~170MB chromium download per run, plus the
fall-through to `actions/cache` for the browser binary which only
hides the cost when the cache backend is healthy.

Bake it into the image instead:
- New ARG PLAYWRIGHT_VERSION=1.59.1 (must match KollectAI-ETL's
  frontend/svelte/package.json @playwright/test pin)
- New ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright (constant location
  Playwright respects across pnpm/npm invocations)
- New RUN: `npx --yes "playwright@${PLAYWRIGHT_VERSION}" install chromium`

System libs (libnss3, libgbm1, libasound2, etc.) were already
pre-installed at the top of the file, so we skip --with-deps. Verify
step now also lists $PLAYWRIGHT_BROWSERS_PATH contents to fail-fast
if a future bump leaves the dir empty.

KollectAI-ETL's frontend.yml drops both `Cache Playwright browsers`
and `Install Playwright browsers` steps in the matching commit on
that side. Net: image build adds ~170MB but every CI test-e2e run
saves ~30-60s (download time + cache I/O).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 07:17:20 +08:00
Fadhli Azhari 13d778dc61 build(frontend-builder): bump default PROTOC_GEN_ES_VERSION to 2.12.0
The 2.4.0 default crashed at runtime with
  "protoc-gen-es: Cannot read properties of undefined (reading 'length')"
when buf v1.55 invoked it. 2.12.x is current and has no such issue.

KollectAI-ETL's CI no longer relies on the image's globally-installed
plugin (the proto-gen workflow now does `pnpm install` in proto/ and
runs `pnpm exec buf generate` to use the lockfile-pinned version), so
this is mainly housekeeping for ad-hoc use inside the container.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 16:05:26 +08:00
Fadhli Azhari f9fb4ce4cd build: add frontend-builder image and bake buf into java-builder
ci/frontend-builder (new): Node 24 + pnpm 10 + buf 1.55 + global
@bufbuild/protoc-gen-es 2.4 + Playwright chromium runtime libs +
ORAS. Used by KollectAI-ETL frontend CI to run TS proto codegen
locally (buf.gen.yaml uses `local: protoc-gen-es`) instead of the
rate-limited BSR remote-plugin path.

ci/java-builder: added the standalone buf binary so `buf lint` runs
in CI without an inline curl install. Backend Java codegen stays in
the Maven build (protobuf-maven-plugin), so no protoc plugins are
added to this image.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 15:06:00 +08:00
Fadhli Azhari fdd8544ed9 build: add pnpm to the java-builder image 2026-04-28 14:25:34 +08:00
Fadhli Azhari 41f4d3e1fe build: add nvd api key to improve build speed 2026-04-28 12:52:45 +08:00
Fadhli Azhari 2f9e35d0eb build: add Node.js 24 to java-builder for actions/checkout support
Gitea Actions checkout@v6 requires Node.js to run. Added Node 24
via NodeSource apt repo (~30MB).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 17:05:57 +08:00
Fadhli Azhari 236c2ff3ee docs: update registry path to 192.168.1.72/kollect-tools/java
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 16:59:40 +08:00
Fadhli Azhari e75d014023 build: Added java 21 build with maven and NVD libraries 2026-04-14 12:27:41 +08:00