Created
August 11, 2017 13:17
-
-
Save cpanato/be258199d193c80f382fa2eb432919ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sout = new StringBuilder(), serr = new StringBuilder() | |
def proc = 'ls /var/jenkins_home/plugins/'.execute() | |
proc.consumeProcessOutput(sout, serr) | |
proc.waitForOrKill(1000) | |
println "out> $sout err> $serr" | |
File file = new File("/var/jenkins_home/plugins/") | |
println "The file ${file.absolutePath} has ${file.length()} bytes" | |
proc = 'cp /var/jenkins_home/plugins/bla.hpi /var/jenkins_home/workspace/blablajob'.execute() | |
proc.consumeProcessOutput(sout, serr) | |
proc.waitForOrKill(1000) | |
println "out> $sout err> $serr" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment