16 lines
750 B
Python
16 lines
750 B
Python
import paramiko, sys
|
|
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)
|
|
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()[:1000])
|
|
|
|
run('빌드 #4 전체 콘솔',
|
|
'curl -sf -u "admin:Admin@2026!" http://127.0.0.1:9080/job/zioinfo-mail/4/consoleText 2>/dev/null')
|
|
run('Jenkins workspace 파일',
|
|
'ls /var/lib/jenkins/workspace/zioinfo-mail/ 2>/dev/null')
|
|
run('Jenkins workspace frontend',
|
|
'ls /var/lib/jenkins/workspace/zioinfo-mail/frontend/ 2>/dev/null')
|
|
c.close()
|