文件
hyb-oa/.trellis/tasks/05-31-deploy-asset-ledger-consistency-public-check/implement.md
T

3.1 KiB
原始文件 Blame 文件历史

实施说明

部署策略

  • 等待用户明确批准后执行公网部署;在获得批准前不连接远端、不运行部署脚本、不写公网数据库。
  • 部署命令固定为:
SYNC_ENV=0 LIVE_SMOKE_BASE_URL=https://oa.hyinda.com bash deploy/trialrun/deploy.sh
  • SYNC_ENV=0 表示不覆盖远端 .env。
  • 部署脚本会在远端执行构建、Prisma migration deploy/status、seed、/ready、external deps smoke、runtime smoke 和公网 bundle 文案扫描。
  • 若本地未配置完整 LIVE_SMOKE_*,部署脚本会跳过网页 live smoke;跳过必须如实记录,不能写成通过。

复检策略

部署后独立运行:

curl -fsS https://oa.hyinda.com/ready
node scripts/qa/check-public-bundle-copy.mjs https://oa.hyinda.com
LIVE_SMOKE_BASE_URL=https://oa.hyinda.com bash scripts/qa/run-live-smoke-readiness.sh
cd client && E2E_BASE_URL=https://oa.hyinda.com npx playwright test tests/e2e/login-portal-ux.spec.ts tests/e2e/visual-portal.spec.ts --workers=1 --reporter=list

风险控制

  • 不同步本地 .env。
  • 不执行真实付款、银行流水导入、真实支付接口、ERP 写入、企业微信写入或数据库重置。
  • 不把 SKIP 写成 PASS。
  • 如部署失败,保留失败点,停止告知用户可线上测试,并优先判断是否需要回滚或拆修复任务。

执行结果

  • 用户已批准公网部署。
  • 部署基线:c669401。
  • 部署命令:
SYNC_ENV=0 LIVE_SMOKE_BASE_URL=https://oa.hyinda.com bash deploy/trialrun/deploy.sh
  • 部署边界:
    • SYNC_ENV=0,未覆盖远端 .env。
    • 未执行真实付款、银行流水导入、真实支付接口、ERP 写入、企业微信写入或数据库重置。
  • 部署脚本结果:
    • 部署环境契约校验通过。
    • 远端前端与 server 镜像构建通过。
    • 远端 Prisma migrate deploy 显示无待执行迁移,migration status 通过。
    • 远端 seed config / seed trialrun 完成。
    • 部署脚本内置公网 bundle 文案扫描 findings=0。
    • 部署脚本网页 live smoke 因本机缺少完整 LIVE_SMOKE_* 凭据而 SKIP。
  • 独立公网复检:
    • curl -fsS https://oa.hyinda.com/ready 通过。
    • node scripts/qa/check-public-bundle-copy.mjs https://oa.hyinda.com:findings=0。
    • LIVE_SMOKE_BASE_URL=https://oa.hyinda.com bash scripts/qa/run-live-smoke-readiness.sh:PASS;其中真实登录 live smoke、真实 OCR 和 pending OCR 因缺少本机凭据/样票/本地数据库连接按规则记录 SKIP。
    • cd client && E2E_BASE_URL=https://oa.hyinda.com npx playwright test tests/e2e/login-portal-ux.spec.ts tests/e2e/visual-portal.spec.ts --workers=1 --reporter=list:15 passed。
    • cd client && E2E_BASE_URL=https://oa.hyinda.com npx playwright test tests/e2e/pc-finance-admin-visual-wave4.spec.ts tests/e2e/r103-cross-page-ui-consistency.spec.ts --workers=1 --reporter=list:7 passed。
  • 结论:
    • 公网部署与可访问复检通过。
    • 可以告知用户访问公网查看本轮资产、台账和工作台相关效果;但不能宣称缺凭据的真实登录 live smoke 或真实 OCR 已通过。