DEV Community

classx
classx

Posted on

Jenkins - run shell command on the master

Go to your jenkins instance

https://local-jenkins/script

paste and run it:

def proc = "ls -l".execute() proc.waitFor() def b = new StringBuffer() proc.consumeProcessErrorStream(b) println proc.exitValue() // print exit code println proc.text // print output 
Enter fullscreen mode Exit fullscreen mode

Top comments (0)