fix: use Playwright image for G14 Tekton CI

This commit is contained in:
Codex
2026-05-25 01:35:24 +08:00
parent 57407d6662
commit 8967857d6d
+8 -2
View File
@@ -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)" },