jenkins中,slave节点有多种启动方式,其中一种是“Launch slave agents via Java Web Start”,即通过JNLP启动一个代理来启动slave。这种方式比较适用于slave部署在windows系统的计算机上。
![](https://img.laitimes.com/img/_0nNw4CM6IyYiwiM6ICdiwiI0gTMx81dsQWZ4lmZf1GLlpXazVmcvwFciV2dsQXYtJ3bm9CX9s2RkBnVHFmb1clWvB3MaVnRtp1XlBXe0xCMy81dvRWYoNHLwEzX5xCMx8FesU2cfdGLwMzX0xiRGZkRGZ0Xy9GbvNGLpZTY1EmMZVDUSFTU4VFRR9Fd4VGdsYTMfVmepNHLrJXYtJXZ0F2dvwVZnFWbp1zczV2YvJHctM3cv1Ce-cGcq5CMyYDN4UjNhdzYkFjNzITZyYzX3ETOwUTM4IzLcdDMyIDMy8CXn9Gbi9CXzV2Zh1WavwVbvNmLvR3YxUjLyM3Lc9CX6MHc0RHaiojIsJye.jpg)
官方描述如下:
Starts a slave by launching an agent program through JNLP. The launch in this case is initiated by the slave, thus slaves need not be IP reachable from the master (e.g. behind the firewall.) It is still possible to start a launch without GUI, for example as a Windows service.
这种启动方式的配置项中,有一个“Tunnel connection through”,可以用来配置JNLP使用指定的IP地址和端口,格式为:"HOST:PORT", ":PORT", or "HOST:"。