zioinfo-mail/scripts/check/verify_gitea_p3.py
DESKTOP-TKLFCPR\ython 371f77e7ab
Some checks are pending
GUARDiA CI / Python Lint & Import Test (push) Waiting to run
GUARDiA CI / Validate Install Scripts (push) Waiting to run
GUARDiA CI / PR Validation Summary (push) Blocked by required conditions
fix(enhance-v4): APK QR 버그 수정 + 웹메일 라우터 수정
2026-06-02 20:23:55 +09:00

24 lines
1.3 KiB
Python

import paramiko, sys, base64
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
c = paramiko.SSHClient(); c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect('101.79.17.164', username='root', password='1q2w3e!Q', timeout=15)
G = base64.b64encode(b'zio:Zio@Admin2026!').decode()
def run(label, cmd, timeout=15):
_, o, _ = c.exec_command(cmd, timeout=timeout)
print(f'\n[{label}]\n' + o.read().decode('utf-8','replace').strip()[:500])
run('Gitea guardia-itsm 최신 커밋',
f'curl -sf "http://127.0.0.1:9003/api/v1/repos/zio/guardia-itsm/commits?limit=3" '
f'-H "Authorization: Basic {G}" 2>/dev/null | '
'python3 -c "import sys,json; [print(c[\'sha\'][:8], c[\'commit\'][\'message\'][:60]) for c in json.load(sys.stdin)]" 2>/dev/null')
run('Gitea P3 파일 확인',
f'curl -sf "http://127.0.0.1:9003/api/v1/repos/zio/guardia-itsm/contents/routers" '
f'-H "Authorization: Basic {G}" 2>/dev/null | '
'python3 -c "import sys,json; files=[f[\'name\'] for f in json.load(sys.stdin)]; '
'p3=[f for f in files if any(k in f for k in [\'multimodal\',\'learning\',\'billing\',\'benchmark\',\'ncloud\',\'cohort\',\'erp\',\'kakao\',\'servicenow\',\'auto_report\',\'ai_insights\',\'container_alerts\'])]; '
'print(f\'P3 파일 {len(p3)}개:\'); [print(\' \',f) for f in p3]" 2>/dev/null')
c.close()