Merge remote-tracking branch 'web/master' into feat/five_min_design
Project CI / Repository checks (pull_request) Successful in 1m32s
Project CI / Frontend tests (pull_request) Successful in 3m5s
Project CI / Backend tests (pull_request) Successful in 4m12s
Project CI / Native shell tests (pull_request) Failing after 11m20s

This commit is contained in:
2026-08-15 08:12:43 +00:00
4 changed files with 37 additions and 2 deletions
@@ -7376,6 +7376,38 @@ if ((fullPipelineMaintenanceHoldCalls?.length ?? 0) !== 2) {
);
}
const webBuildContent = readFileSync(
'jenkins/Jenkinsfile.production-web-build',
'utf8',
);
const webBuildStageOffset = webBuildContent.indexOf("stage('Build Web')");
const webArchiveStageOffset = webBuildContent.indexOf(
"stage('Archive')",
webBuildStageOffset,
);
const webBuildStageContent =
webBuildStageOffset >= 0 && webArchiveStageOffset > webBuildStageOffset
? webBuildContent.slice(webBuildStageOffset, webArchiveStageOffset)
: '';
const webNpmCiBlock = `if (params.RUN_NPM_CI) {
sh 'bash -lc "npm ci"'
sh 'bash -lc "npm ci --prefix apps/ai-game-creator-shell"'
}`;
const webNpmCiBlockOffset = webBuildStageContent.indexOf(webNpmCiBlock);
const webTestOffset = webBuildStageContent.indexOf('npm run test');
const webNpmCiCalls = webBuildStageContent.match(/\bnpm ci(?:\s|["'])/gu);
if (
webNpmCiBlockOffset < 0 ||
webTestOffset < 0 ||
webNpmCiBlockOffset >= webTestOffset ||
(webNpmCiCalls?.length ?? 0) !== 2
) {
failed = true;
console.error(
'[check:production-ops] Web Build 必须在 RUN_NPM_CI 条件块内依次安装根 lockfile 与 apps/ai-game-creator-shell 独立 lockfile,并在 npm run test 前完成;RUN_NPM_CI=false 时两次安装必须一起跳过。',
);
}
const exitMaintenanceStageOffset = fullPipelineContent.indexOf(
"stage('Exit Maintenance')",
);