Skip to content

Instantly share code, notes, and snippets.

@thomaslorentsen
Created June 6, 2019 22:41
Show Gist options
  • Save thomaslorentsen/b20b9cbac2df1798bbd3e0b22554fa5f to your computer and use it in GitHub Desktop.
Save thomaslorentsen/b20b9cbac2df1798bbd3e0b22554fa5f to your computer and use it in GitHub Desktop.
Run shell commands in jenkins
process = Runtime.getRuntime().exec("echo hello")
process.waitFor()
input = process.getInputStream()
while ((c=input.read()) != -1) {
print((char) c);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment