提交 561f6ecc authored 作者: 陈泽健's avatar 陈泽健

fix(deploy): 修复X86自动更新部署包版本中的auth包路径错误

- 修正PRD文档中auth包路径为auth-sso-auth
- 修复配置文件中auth包路径配置
- 添加测试服务器目录存在性检查功能
- 实现缺失目录跳过机制并记录警告日志
- 优化打包逻辑仅包含存在的服务目录
上级 e917ed43
......@@ -35,7 +35,7 @@
{"name": "h5-platform-platform-mobile", "path": "web/h5/h5-uniapp-platform/unified-platform-mobile"}
],
"backend_jar": [
{"name": "auth包", "path": "api/auth/auth-sso-aut", "file": "ubains-auth.jar"},
{"name": "auth包", "path": "api/auth/auth-sso-auth", "file": "ubains-auth.jar"},
{"name": "gatway包", "path": "api/auth/auth-sso-gatway", "file": "ubains-gateway.jar"},
{"name": "system包", "path": "api/auth/auth-sso-system", "file": "ubains-modules-system.jar"},
{"name": "java2.0包", "path": "api/java-meeting/java-meeting2.0", "file": "ubains-meeting-inner-api-1.0-SNAPSHOT.jar"},
......
......@@ -394,16 +394,41 @@ class X86PackageUpdate:
self.log("步骤3:从测试服务器打包所有服务包")
self.log("=" * 50)
# 构建打包命令,只打包文档列出的目录
tar_dirs = []
# 收集所有待打包的目录路径
all_dirs = []
for svc in self.services['frontend']:
tar_dirs.append(svc['path'])
all_dirs.append(svc['path'])
for svc in self.services['backend_jar']:
tar_dirs.append(svc['path'])
all_dirs.append(svc['path'])
for svc in self.services['backend_folder']:
tar_dirs.append(svc['path'])
all_dirs.append(svc['path'])
# 检查测试服务器上哪些目录实际存在
self.log("检查测试服务器上的服务目录...")
check_cmd = 'cd /data/services && for d in ' + ' '.join(all_dirs) + '; do [ -d "$d" ] && echo "EXISTS:$d" || echo "MISSING:$d"; done'
exit_code, out, err = self._exec_test_cmd(check_cmd, timeout=60)
existing_dirs = []
missing_dirs = []
for line in out.strip().split('\n'):
if not line.strip():
continue
if line.startswith('EXISTS:'):
existing_dirs.append(line.replace('EXISTS:', ''))
elif line.startswith('MISSING:'):
missing_dirs.append(line.replace('MISSING:', ''))
if missing_dirs:
self.log(f"以下目录在测试服务器上不存在,将跳过: {missing_dirs}", "WARN")
if not existing_dirs:
msg = "测试服务器上没有任何目标服务目录存在"
self.log(msg, "ERROR")
self._record_step(3, "测试服务器打包", "失败", msg)
return False
self.log(f"找到 {len(existing_dirs)}/{len(all_dirs)} 个有效服务目录")
dirs_str = ' '.join(tar_dirs)
dirs_str = ' '.join(existing_dirs)
remote_tmp_tar = '/tmp/services_update.tar.gz'
# 先清理旧的临时文件
......
......@@ -135,7 +135,7 @@
- static文件夹
### 后端服务目录:
- auth包:/data/offline_auto_unifiedPlatform/data/services/api/auth/auth-sso-aut
- auth包:/data/offline_auto_unifiedPlatform/data/services/api/auth/auth-sso-auth
- ubains-auth.jar
- gatway包:/data/offline_auto_unifiedPlatform/data/services/api/auth/auth-sso-gatway
- ubains-gateway.jar
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论