修复(08-08-production-deployment-execution): 持久化远端部署阶段日志
这个提交包含在:
@@ -96,6 +96,17 @@ describe("deployment safety contract", () => {
|
||||
expect(wrapper).toContain("DEPLOY_STATUS_OUTPUT_MODE=quiet");
|
||||
expect(deploy).toContain("DEPLOY_STATUS_OUTPUT_MODE");
|
||||
expect(deploy).toContain("DEPLOY_STATUS_OUTPUT_MODE='${DEPLOY_STATUS_OUTPUT_MODE}'");
|
||||
expect(deploy).toContain('DEPLOY_RUNTIME_LOG_REF="artifacts/deployment-runtime"');
|
||||
expect(deploy).toContain('install -d -m 0700 "$DEPLOY_RUNTIME_LOG_DIR"');
|
||||
expect(deploy).toContain('chmod 0600 "$log_file"');
|
||||
expect(deploy).toContain('>"$log_file" 2>&1');
|
||||
expect(deploy).toMatch(/if "\$@" <\/dev\/null >"\$log_file" 2>&1; then[\s\S]*else\s+local status=\$\?/u);
|
||||
expect(deploy).toContain('run_logged_deploy_stage "build-init"');
|
||||
expect(deploy).toContain('run_logged_deploy_stage "run-init"');
|
||||
expect(deploy).toContain('run_logged_deploy_stage "build-switch-server"');
|
||||
expect(deploy).not.toContain('\n"${compose_cmd[@]}" build init\n');
|
||||
expect(deploy).not.toContain('\n"${compose_cmd[@]}" run --rm -T --entrypoint sh init');
|
||||
expect(deploy).not.toContain('\n"${compose_cmd[@]}" "${profile_args[@]}" up -d --build server\n');
|
||||
expect(wrapper).toContain("生产部署验证不接受未进入上游的提交");
|
||||
expect(wrapper).toContain("部署后 migration status 与目标只读复核");
|
||||
expect(wrapper).toContain('EXPECTED_PENDING_MIGRATIONS=""');
|
||||
|
||||
在新工单中引用
屏蔽一个用户