From 8967857d6d68515aacfd8aa423c5c74ed13c8dbe Mon Sep 17 00:00:00 2001 From: Codex Date: Mon, 25 May 2026 01:35:24 +0800 Subject: [PATCH] fix: use Playwright image for G14 Tekton CI --- scripts/g14-gitops-render.mjs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/g14-gitops-render.mjs b/scripts/g14-gitops-render.mjs index 68b37b5c..382d91f3 100644 --- a/scripts/g14-gitops-render.mjs +++ b/scripts/g14-gitops-render.mjs @@ -280,7 +280,12 @@ function ciJsonScript(ci) { const lines = [ "#!/bin/sh", "set -eu", - "apk add --no-cache git python3 openssh-client", + "if ! command -v git >/dev/null 2>&1 || ! command -v python3 >/dev/null 2>&1 || ! command -v ssh >/dev/null 2>&1; then", + " export DEBIAN_FRONTEND=noninteractive", + " apt-get update", + " apt-get install -y --no-install-recommends git python3 openssh-client ca-certificates", + " rm -rf /var/lib/apt/lists/*", + "fi", "mkdir -p /root/.ssh", "cp /workspace/git-ssh/ssh-privatekey /root/.ssh/id_rsa", "chmod 600 /root/.ssh/id_rsa", @@ -291,6 +296,7 @@ function ciJsonScript(ci) { "git checkout \"$(params.revision)\"", "test \"$(git rev-parse HEAD)\" = \"$(params.revision)\"", "npm ci --ignore-scripts", + "npx playwright install chromium", `echo ${shellSingleQuote(`CI.json ${ci.name ?? "hwlab"} command count=${commands.length}`)}` ]; for (const command of commands) { @@ -391,7 +397,7 @@ function tektonPipeline(ci) { { name: "revision" } ], workspaces: [{ name: "source" }, { name: "git-ssh" }], - steps: [{ name: "ci-json", image: "node:22-alpine", script: ciJsonScript(ci) }] + steps: [{ name: "ci-json", image: "mcr.microsoft.com/playwright:v1.59.1-noble", script: ciJsonScript(ci) }] }, params: [ { name: "git-url", value: "$(params.git-url)" },