Skip to content

Instantly share code, notes, and snippets.

@namuan
Created September 4, 2018 09:22
Show Gist options
  • Save namuan/9418b907e0c169736711c393311aac05 to your computer and use it in GitHub Desktop.
Save namuan/9418b907e0c169736711c393311aac05 to your computer and use it in GitHub Desktop.
[Running CLI commands from Jenkins Script console] #jenkins #cli
# Simple command
"cat ...".execute().text
# Parse output
def dockerImages = "docker images".execute().text
dockerImages.eachLine { d -> !d.contains('feature') && println(d) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment