Add local Jenkins controller watchdog
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-05-03 14:18:27 +08:00
parent 01b302d7eb
commit 49aad7311c
3 changed files with 99 additions and 0 deletions

View File

@@ -223,6 +223,8 @@ Jenkins 可运行在 Windows 或其他机器上,本机 Windows 只作为人工
本地反向隧道脚本不内置目标机地址;注册 Windows 计划任务时必须显式传入 `-RemoteHost <release-agent-host>`,真实 IP 或主机名只保存在本地计划任务配置中,不提交到 Git。
当 Jenkins controller 以本地 Windows `java -jar jenkins.war` 方式运行时,使用 `scripts/deploy/jenkins-local-controller-watchdog.ps1` 作为本地守护脚本。该脚本只保存本机 Java、`jenkins.war``JENKINS_HOME` 和端口路径,不保存 Jenkins 账号、密码、token 或 agent secret注册 Windows 计划任务后,脚本会在登录后检查 `8080` 是否已有 Jenkins 监听,若已有则监控现有 PID若进程退出或端口空闲则重新启动 Jenkins并固定 `--agentPort=50000` 供远端 inbound agent 连接。
首次迁移示例:
```bash
@@ -579,6 +581,7 @@ WASM_SOURCE="${CARGO_TARGET_DIR}/wasm32-unknown-unknown/release/spacetime_module
- [x] `scripts/deploy/maintenance-on.sh`
- [x] `scripts/deploy/maintenance-off.sh`
- [x] `scripts/deploy/maintenance-status.sh`
- [x] `scripts/deploy/jenkins-local-controller-watchdog.ps1`
- [x] `scripts/deploy/jenkins-agent-reverse-tunnel.ps1`
- [x] `scripts/deploy/jenkins-inbound-agent-start.sh`
- [x] `scripts/deploy/install-jenkins-inbound-agent.sh`