Skip to content

Instantly share code, notes, and snippets.

@CodeMan99
Last active March 25, 2018 19:08
Show Gist options
  • Save CodeMan99/2fb271b743480ce4915d to your computer and use it in GitHub Desktop.
Save CodeMan99/2fb271b743480ce4915d to your computer and use it in GitHub Desktop.
/*
* Home directory: /var/lib/jenkins/
* Example Job Workspace: /var/lib/jenkins/.jenkins/workspace/Sterling-make-build/
*/
def command = """
apt-cache showpkg python3-pip
""";
def proc = command.execute();
proc.waitFor();
println "return code: ${ proc.exitValue()}";
println "stderr:\n${proc.err.text}";
println "stdout:\n${proc.in.text}";
// To cat a file do:
//File f = new File("/var/lib/jenkins/.pip/pip.log")
//f.eachLine { l -> println(l) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment