chore: add cicd legacy cleanup precheck

This commit is contained in:
Codex
2026-05-20 00:27:51 +00:00
parent fced0520fe
commit 240ff7bdb1
18 changed files with 283 additions and 12 deletions
+2 -3
View File
@@ -57,7 +57,6 @@ bun scripts/cli.ts artifact-registry render
bun scripts/cli.ts artifact-registry install
bun scripts/cli.ts artifact-registry status
bun scripts/cli.ts artifact-registry health
bun scripts/cli.ts artifact-registry deploy-backend-core --commit <full-sha>
bun scripts/cli.ts artifact-registry deploy-service --service baidu-netdisk --commit <full-sha>
bun scripts/cli.ts artifact-registry deploy-service --service frontend --env prod --commit <full-sha>
bun scripts/cli.ts artifact-registry deploy-service --service frontend --env dev --commit <full-sha>
@@ -68,7 +67,7 @@ bun scripts/cli.ts artifact-registry deploy-service --service decision-center --
真实 `install` 必须是幂等动作:创建远端目录,写入 CLI 渲染出的 config/compose/unit,执行 `systemctl daemon-reload`,启用并启动 `unidesk-artifact-registry.service`,然后运行与 `health` 相同的验收检查。若远端文件 hash 与期望不一致,install 可以覆盖由本 CLI 管理的 unit/config/compose,但不得删除 registry storage。
`deploy-backend-core` production backend-core CD 入口。它必须先通过 CNCF Distribution HTTP API 确认 D601 registry 中已经存在 `unidesk/backend-core:<commit>`,随后通过 provider-gateway Host SSH 流式执行 `docker save | gzip`,在 master server 侧 `docker load`、retag、Compose `--no-build` recreate 和 live commit 验证;如果镜像不存在,应失败并要求先运行 CI artifact publication
`deploy-backend-core`旧兼容入口,当前作为标准路径已禁用。Production backend-core CD 必须使用 `bun scripts/cli.ts deploy apply --env prod --service backend-core --commit <full-sha>`,由 deploy reconciler 先执行共同的 artifact-consumer guardrail,再调用通用 `deploy-service` consumer。旧入口只能返回 structured deprecated 结果,不得绕过 `deploy apply --env prod`
`deploy-service` 是标准化后的最小通用 artifact consumer。它目前只支持 `backend-core``baidu-netdisk`、prod/dev `frontend``decision-center`,并且必须先通过 D601 registry 的 commit-pinned manifest 校验,再执行拉取、导入/retag、部署和健康验证:
@@ -133,4 +132,4 @@ Baidu Netdisk is the first main-server direct user-service sample in this flow.
- provider-gateway SSH image stream 是临时控制动作,不开放长期公网 registry。
- CI 可以有较多依赖;CD 只做拉取、retag、recreate 和 live commit 验证。
- CD 不执行 `cargo build``docker build``docker compose build <service>` 或任何等价构建动作。
- `server rebuild backend-core``server rebuild baidu-netdisk` 仍是维护/非标准路径,不得作为 artifact CD 完成证据。
- `artifact-registry deploy-backend-core``server rebuild backend-core``server rebuild baidu-netdisk` 仍是维护/兼容/非标准路径,不得作为 artifact CD 完成证据。