diff --git a/docs/reference/g14-gitops-cicd.md b/docs/reference/g14-gitops-cicd.md index e75983a3..7f7fbd08 100644 --- a/docs/reference/g14-gitops-cicd.md +++ b/docs/reference/g14-gitops-cicd.md @@ -18,7 +18,7 @@ G14 是 HWLAB 的旁路 DEV 集群目标。G14 CI/CD 必须只作用于 G14 k3s - 读取 `deploy/deploy.json` 与 `deploy/k8s/*`,生成 Argo CD 可消费的 G14 runtime Kustomize path。 - 默认输出到 `deploy/gitops/g14/`。 - 默认 registry prefix 是 `127.0.0.1:5000/hwlab`,用于 G14 单节点 k3s 的 node-local registry。 -- 默认 CI/CD proxy 是 G14 本机 `http://127.0.0.1:10808` / `socks5h://127.0.0.1:10808`。Tekton CI step、Docker-in-Docker sidecar 和 publish step 都注入 proxy/no_proxy,保证 npm、Playwright、base image 拉取和 registry push 走 G14 本机代理边界。 +- 默认 CI/CD proxy 是 G14 本机 `http://127.0.0.1:10808` / `socks5h://127.0.0.1:10808`。Tekton CI step、Docker-in-Docker sidecar 和 publish step 都注入 proxy/no_proxy,保证 npm、Playwright Chromium 安装、base image 拉取和 registry push 走 G14 本机代理边界。CI step 固定使用 Node 22 Debian 镜像,避免 Playwright 官方镜像内 Node 版本漂移影响 `node --test`。 常用命令: diff --git a/scripts/g14-gitops-render.mjs b/scripts/g14-gitops-render.mjs index 63563ae8..71c37480 100644 --- a/scripts/g14-gitops-render.mjs +++ b/scripts/g14-gitops-render.mjs @@ -312,7 +312,7 @@ function ciJsonScript(ci) { "git checkout \"$(params.revision)\"", "test \"$(git rev-parse HEAD)\" = \"$(params.revision)\"", "npm ci --ignore-scripts", - "npx playwright install chromium", + "npx playwright install --with-deps chromium", `echo ${shellSingleQuote(`CI.json ${ci.name ?? "hwlab"} command count=${commands.length}`)}` ]; for (const command of commands) { @@ -413,7 +413,7 @@ function tektonPipeline(ci) { { name: "revision" } ], workspaces: [{ name: "source" }, { name: "git-ssh" }], - steps: [{ name: "ci-json", image: "mcr.microsoft.com/playwright:v1.59.1-noble", env: proxyEnv(), script: ciJsonScript(ci) }] + steps: [{ name: "ci-json", image: "node:22-bookworm-slim", env: proxyEnv(), script: ciJsonScript(ci) }] }, params: [ { name: "git-url", value: "$(params.git-url)" },