I am running the following Groovy script which works perfect from the compiler & Jenkins ( if it runs a slave /node)
Because I want to run the script the "This project is parameterised" I noticed Jenkins is always running.
I Use the following Script:
// setup SSH connection:
sshString = "ssh -T -i keyfile -p 22 [email protected] "
cmdLine = "/appl/test/script.sh"
conString = sshString + cmdLine
// execute command
def proc = conString.execute()
def outputStream = new StringBuffer()
proc.waitForProcessOutput(outputStream, System.out)
output = (outputStream .toString())
println(output)
On the slave I get the result of the shell script, on the master the result is NULL.
What am I doing wrong