修复发号Job未授权调度器读取归档导致整轮调度失败
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Failing after 18s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Failing after 18s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Failing after 18s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Failing after 19s
Project CI / AI game creator shell Rust smoke (pull_request) Failing after 20s
Project CI / AI game creator shell Rust crates (pull_request) Failing after 20s
Project CI / Native shell tests (pull_request) Failing after 19s
Project CI / Backend tests (pull_request) Failing after 20s
Project CI / Frontend tests (pull_request) Failing after 9s
Project CI / Repository checks (pull_request) Failing after 13s
Project CI / AI game creator shell web tests (pull_request) Failing after 13s

发号Jenkinsfile显式copyArtifactPermission授权调度管线
生产门禁新增该授权规则避免回归
运维文档补充生产者到调度器的Copy Artifact映射与失败后果
This commit is contained in:
2026-09-20 22:58:39 +08:00
parent 62bffebf8e
commit d354e5e7c3
3 changed files with 15 additions and 1 deletions
@@ -698,7 +698,7 @@ cat /var/lib/genarrative/health-patrol/status.json
如需接外部告警,可在 `/etc/genarrative/health-patrol.env` 配置 `GENARRATIVE_HEALTH_PATROL_WEBHOOK_URL`;脚本只会在 `WARNING``CRITICAL` 时向该 webhook 发送 JSON。未配置 webhook 时,告警来源是 systemd 失败状态、journal 和状态文件。
Jenkins Copy Artifact 必须保持 `Production` 权限模式;产物生产者要在 Jenkinsfile 中用 `copyArtifactPermission` 精确授权消费者,不能依赖 Migration 模式或全局 `Job/Read`。固定映射为 `Genarrative-Stdb-Module-Build``Genarrative-Stdb-Module-Publish``Genarrative-Api-Build``Genarrative-Api-Deploy``Genarrative-Web-Build``Genarrative-Web-Deploy``Genarrative-Database-Export``Genarrative-Database-Import`。如果 `copyArtifacts``Unable to find project for artifact copy`,但来源 Job、指定构建号和归档都实际存在,先检查来源 Job 的 `CopyArtifactPermissionProperty`;修复 Jenkinsfile 后必须先运行一次产物生产者,让 Declarative Pipeline 把 Job property 写回 Jenkins,再重跑 Deploy / Publish / Import。`npm run check:production-ops` 会防止四条白名单再次丢失。
Jenkins Copy Artifact 必须保持 `Production` 权限模式;产物生产者要在 Jenkinsfile 中用 `copyArtifactPermission` 精确授权消费者,不能依赖 Migration 模式或全局 `Job/Read`。固定映射为 `Genarrative-Stdb-Module-Build``Genarrative-Stdb-Module-Publish``Genarrative-Api-Build``Genarrative-Api-Deploy``Genarrative-Web-Build``Genarrative-Web-Deploy``Genarrative-Database-Export``Genarrative-Database-Import``Genarrative-Agc-Global-Version-Issue``Genarrative-Scheduled-Revision-Trigger`(发号 Job 必须授权调度器读 `agc-global-version.txt`;缺这条会让整轮调度在发号之后失败——号已烧、渠道构建没被触发,2026-09-20 #103 即为此)。如果 `copyArtifacts``Unable to find project for artifact copy`,但来源 Job、指定构建号和归档都实际存在,先检查来源 Job 的 `CopyArtifactPermissionProperty`;修复 Jenkinsfile 后必须先运行一次产物生产者,让 Declarative Pipeline 把 Job property 写回 Jenkins,再重跑 Deploy / Publish / Import。`npm run check:production-ops` 会防止四条白名单再次丢失。
`Genarrative-Web-Build` 的主站构建失败若出现 Rollup 报错 `"xxx" is not exported by "src/services/publicWorkCode.ts"`,优先按前端公开作品号工具缺失处理,而不是排查 Jenkins 节点环境。修复时要让 `publicWorkCode.ts``build<Play>PublicWorkCode``isSame<Play>PublicWorkCode` 成对导出,并补 `src/services/publicWorkCode.test.ts` 覆盖对应玩法前缀;随后用 `npm run build:production-release -- --component web --name <临时名>` 复现 Jenkins web 构建路径。
@@ -15,6 +15,13 @@ pipeline {
disableConcurrentBuilds()
skipDefaultCheckout(true)
buildDiscarder(logRotator(numToKeepStr: '100', artifactNumToKeepStr: '20'))
// Copy Artifact 保持 Production 权限模式:生产者必须显式授权消费者。
// 调度管线要 copy 本 Job 的 agc-global-version.txt 才能把总号透传给渠道构建;
// 缺这条授权时 copyArtifacts 会报「Unable to find project for artifact copy」,
// 整轮调度失败,且失败点在发号之后 —— 号已烧、Windows 也没被触发
// 2026-09-20 首次统一发号 #103 即命中)。改完本文件后必须先单独跑一次本 Job,
// 让 Declarative Pipeline 把 Job property 写回 Jenkins,再重跑调度。
copyArtifactPermission('Genarrative-Scheduled-Revision-Trigger')
}
environment {
@@ -42,6 +42,13 @@ const checks = [
reason:
'Copy Artifact Production 模式下,API Build 必须显式授权 API Deploy 读取归档。',
},
{
file: 'jenkins/Jenkinsfile.agc-global-version-issue',
includes:
"copyArtifactPermission('Genarrative-Scheduled-Revision-Trigger')",
reason:
'Copy Artifact Production 模式下,AGC 发号 Job 必须显式授权调度管线读取 agc-global-version.txt,否则整轮调度会在 copyArtifacts 处失败。',
},
{
file: 'jenkins/Jenkinsfile.production-stdb-module-build',
includes: 'npm run check:rustfmt',