查找 Jenkins 节点的 IP [英] Finding IP of a Jenkins node

查看:96
本文介绍了查找 Jenkins 节点的 IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个windows slave节点,通过Java web start"连接到Jenkins服务器.节点的系统信息没有它的 IP 地址.

A windows slave node connected to Jenkins server through "Java web start". The system information of the node doesn't have it's IP address.

我不得不跑遍我们所有的slave节点,找到Jenkins中的slave节点对应的机器(ip地址).

I had to run through all the slaves node we had, and find which machine (ip address) corresponds to the slave node in Jenkins.

有没有办法从 Jenkins 本身找到从节点的 IP 地址?

Is there a way to find the IP address of a slave node from Jenkins itself?

推荐答案

通过脚本控制台(Manage Jenkins -> Nodes -> 选择一个节点 -> Script Console) 的节点,我们可以执行 groovy 脚本.运行以下命令获取IP地址.

Through the Script Console (Manage Jenkins -> Nodes -> Select a node -> Script Console) of the node we can execute groovy script. Run the following command to get the IP address.

println InetAddress.localHost.canonicalHostName

这篇关于查找 Jenkins 节点的 IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆