def ipadd = addr.hostAddress
//println ipadd
String myString = new Integer(ipadd);
def pa = new ParametersAction([new StringParameterValue('IPADDR', myString)]);
Thread.currentThread().executable.addAction(pa)
println 'Script finished! \n';
I am trying to save the ip address of the slave by adding it to System variable and pass it to next job.But when I run the job , I am getting below exception : Logs :
Slave Machine 2: X.X.X.X
java.lang.NumberFormatException: For input string: "X.X.X.X"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.<init>(Integer.java:867)