You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
slms/scripts/monitor_jenkins.bat

32 lines
907 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

@echo off
chcp 65001 >nul
echo ========================================
echo Jenkins 流水线实时监控
echo ========================================
echo.
echo 正在检查Jenkins状态...
echo.
REM 尝试访问Jenkins API获取最新构建状态
curl -s http://localhost:8084/job/SLMS/lastBuild/api/json > jenkins_status.json 2>nul
if exist jenkins_status.json (
echo ✅ Jenkins连接成功
echo.
echo 📊 最新构建信息:
type jenkins_status.json | findstr "number" | findstr /V "nextBuild"
type jenkins_status.json | findstr "result"
type jenkins_status.json | findstr "building"
echo.
del jenkins_status.json
) else (
echo ⚠️ 无法连接到Jenkins请确认Jenkins正在运行
echo.
)
echo 🔗 Jenkins控制台: http://localhost:8084/job/SLMS/
echo.
echo 按任意键打开Jenkins控制台...
pause >nul
start http://localhost:8084/job/SLMS/