基于 Jenkins 实现主从多节点
无心戈1 分钟阅读
环境
- 公网 Ubuntu Server 一台
- Windows 下 Hyper-V 内 Ubuntu Server 虚拟机一台

步骤
- 配置 Jenkins master 节点
- 公网 Ubuntu Server 安装 Jenkins,安装好后,参考 https://pkg.jenkins.io/debian-stable/。
- 配置 Jenkins slave 节点
- 打开页面 http://jenkins-host:8080/manage/computer/ jenkins-host 为公网 Ubuntu Server 的 IP 地址
- 点击添加节点,并填写名称、选择固定节点,启动方式选择“通过 JavaWeb 启动代理”。
- 从节点状态页面,找到
Run from agent command line: (Unix)下的命令,在 Ubuntu Server 虚拟机中执行即可上线此节点。