Skip to content

Instantly share code, notes, and snippets.

@atomsfat
Created October 15, 2013 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atomsfat/6998148 to your computer and use it in GitHub Desktop.
Save atomsfat/6998148 to your computer and use it in GitHub Desktop.
certficate jenkins
def command = """cat /var/lib/jenkins/.ssh/id_rsa.pub"""// Create the String
def proc = command.execute() // Call *execute* on the string
proc.waitFor() // Wait for the command to finish
// Obtain status and output
println "return code: ${ proc.exitValue()}"
println "stderr: ${proc.err.text}"
println "stdout: ${proc.in.text}" // *out* from the external program is *in* for groovy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment