feat(ops): 添加发布 smoke test

- 新增只读发布 smoke runner 和 dry-run 测试\n- 将生产部署 workflow 从单点版本检查升级为 smoke test\n- 补充 Docker web runtime 脚本复制、package script 和部署文档\n\nCo-Authored-By: GPT-5 Codex <codex@openai.com>
This commit is contained in:
2026-07-08 16:14:48 +08:00
parent 2161970543
commit eef09d5af4
7 changed files with 193 additions and 20 deletions

View File

@@ -21,6 +21,7 @@ const checks = [
'NEXT_PUBLIC_API_URL',
'NEXT_PUBLIC_APP_VERSION',
'ARG APP_VERSION=unknown',
'COPY scripts ./scripts',
'CMD ["pnpm", "--filter", "web", "start"]',
],
},
@@ -59,13 +60,22 @@ const checks = [
'appleboy/ssh-action',
'docker compose --env-file .env.production -f docker-compose.prod.yml pull',
'pnpm --filter server db:deploy',
'/api/v1/health/version',
'scripts/smoke-test-release.mjs',
'--expected-version',
],
},
{
file: 'scripts/check-runtime-version.mjs',
snippets: ['Runtime version verified', '/api/v1/health/version', 'expectedVersion'],
},
{
file: 'scripts/smoke-test-release.mjs',
snippets: [
'Release smoke test passed',
'/api/v1/v2.2/requirements?productId=__smoke__',
'/api/v1/config/ai',
],
},
{
file: 'scripts/backup-postgres.mjs',
snippets: ['pg_dump', '--format=custom', '--dry-run'],