From cb737cae941c853e3c5cd2607e4ca3f88c505d49 Mon Sep 17 00:00:00 2001 From: kdletters Date: Wed, 2 Sep 2026 11:02:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20AGC=20Jenkins=20?= =?UTF-8?q?=E7=A9=BA=E5=8F=82=E6=95=B0=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit COMMIT_HASH 为空时按空字符串处理 OSSUTIL_BIN 为空时按默认命令处理 补充 Windows 构建节点参数行为说明 --- .../【技术方案】AGC客户端更新检查与下载-2026-08-31.md | 1 + jenkins/Jenkinsfile.ai-game-creator-shell-build | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/technical/【技术方案】AGC客户端更新检查与下载-2026-08-31.md b/docs/technical/【技术方案】AGC客户端更新检查与下载-2026-08-31.md index 0221e9304..bce24d154 100644 --- a/docs/technical/【技术方案】AGC客户端更新检查与下载-2026-08-31.md +++ b/docs/technical/【技术方案】AGC客户端更新检查与下载-2026-08-31.md @@ -54,6 +54,7 @@ AGC 发布流水线使用 `jenkins/Jenkinsfile.ai-game-creator-shell-build`, 10.9.7、Rust 1.96.0、Visual Studio Build Tools(MSVC 与 Windows SDK)、NSIS、Git 和 ossutil; Jenkins Agent 服务必须能在同一用户环境中找到这些命令。流水线执行根 workspace 的 `npm ci`,然后调用 `npm run ai-game-creator-shell:release:upload`,并归档 Windows 安装包、`latest.json` 与源码 commit。 +流水线会将未导出的空参数按空字符串处理:`COMMIT_HASH` 留空时沿用 Jenkins SCM 当前提交,`OSSUTIL_BIN` 留空时使用节点 PATH 中的 `ossutil`,不会因 PowerShell 对空环境变量调用 `.Trim()` 而提前失败。 Jenkins Job 在“Build and upload”阶段通过受保护凭据 ID `AliyunAccessKeyId` 和 `AliyunaccessKeySecret` 注入 AccessKey,仅在当前进程运行时传给 ossutil,不写入仓库、workspace 或构建日志; diff --git a/jenkins/Jenkinsfile.ai-game-creator-shell-build b/jenkins/Jenkinsfile.ai-game-creator-shell-build index e541f2abe..ab7e44744 100644 --- a/jenkins/Jenkinsfile.ai-game-creator-shell-build +++ b/jenkins/Jenkinsfile.ai-game-creator-shell-build @@ -47,7 +47,7 @@ pipeline { if ($LASTEXITCODE -ne 0) { throw 'Git fetch 分支失败' } & $git checkout --detach "origin/$($env:SOURCE_BRANCH)" } - $commit = $env:COMMIT_HASH.Trim() + $commit = ([string]$env:COMMIT_HASH).Trim() if ($commit) { if ($commit -notmatch '^[0-9a-fA-F]{7,64}$') { throw 'COMMIT_HASH 必须是 7-64 位十六进制 Git commit。' @@ -85,7 +85,7 @@ pipeline { throw "Windows AGC 节点缺少 $commandName,请先安装并加入 Jenkins Agent PATH。" } } - $ossutil = $env:OSSUTIL_BIN.Trim() + $ossutil = ([string]$env:OSSUTIL_BIN).Trim() if (-not $ossutil) { $ossutil = 'ossutil' } if (-not (Get-Command $ossutil -ErrorAction SilentlyContinue)) { throw "Windows AGC 节点缺少 ossutil:$ossutil" From 4a2f5be6c5c186e6ad80aa45167ca3b6495f3af4 Mon Sep 17 00:00:00 2001 From: kdletters Date: Wed, 2 Sep 2026 11:14:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=90=8C=E6=AD=A5=20AGC=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=B8=8B=E8=BD=BD=E5=9F=9F=E5=90=8D=E9=97=A8=E7=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 允许受信任 OSS 更新资源域名 保持客户端更新网络范围与运行时配置一致 --- scripts/check-native-shells.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/check-native-shells.mjs b/scripts/check-native-shells.mjs index 293154ad9..e99d87784 100644 --- a/scripts/check-native-shells.mjs +++ b/scripts/check-native-shells.mjs @@ -2425,6 +2425,7 @@ function assertAiGameCreatorShellUserDevBoundary() { JSON.stringify([ { url: 'https://dev.genarrative.world/api/*' }, { url: 'https://www.genarrative.world/api/*' }, + { url: 'https://agc-dev.oss-rg-china-mainland.aliyuncs.com/*' }, { url: 'https://*/api/*' }, { url: 'http://localhost:*/*' }, { url: 'http://127.0.0.1:*/*' },