Skip to content

Instantly share code, notes, and snippets.

@rtyler
Created July 12, 2017 15:20
Show Gist options
  • Save rtyler/6f4993999c1ff03226abb22edcb9486a to your computer and use it in GitHub Desktop.
Save rtyler/6f4993999c1ff03226abb22edcb9486a to your computer and use it in GitHub Desktop.
def label = input(message: 'Pick a node:', parameters: [string(defaultValue: 'docker', description: '', name: 'Node')])
node(label) {
def lastCommand = 'ls'
while (true) {
lastCommand = input(message: 'Execute on the host:', ok: 'Run', parameters: [string(defaultValue: lastCommand, description: '', name: 'Command')])
sh(returnStatus: true, script: lastCommand)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment