maven - How to SSH into jenkins host executing code -


i have jenkins job set , i'm having issues getting around company's proxy. i'd ssh jenkins slave executing job.

where find host name in jenkins?

so can add proper proxy settings.xml file. should located {home}/.m2/settings.xml

inspired answer. running groovy script on jenkins script console list slaves , ip address.

import hudson.util.remotingdiagnostics;  print_ip = 'println inetaddress.localhost.hostaddress'; print_hostname = 'println inetaddress.localhost.canonicalhostname';  // here - shell command, uname example  uname = 'def proc = "uname -a".execute(); proc.waitfor(); println proc.in.text';  (slave in hudson.model.hudson.instance.slaves) {     println slave.name;     println remotingdiagnostics.executegroovy(print_ip, slave.getchannel()); } 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -