Create a gist now

Instantly share code, notes, and snippets.

@rtyler /Jenkinsfile Secret
Created Jul 12, 2017

What would you like to do?
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