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

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

问题描述

通过"Java Web Start"连接到Jenkins服务器的Windows从属节点.节点的系统信息没有其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.

我必须遍历我们拥有的所有从属节点,并找到与Jenkins中的从属节点相对应的机器(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?

推荐答案

通过脚本控制台(管理Jenkins -> 节点-> 选择一个节点-> 脚本控制台)的节点,我们可以执行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天全站免登陆