Last active
August 29, 2015 14:07
-
-
Save int128/4fe93cbd8b58302e25b2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh { | |
outputLogLevel = LogLevel.LIFECYCLE | |
} | |
task example(type: SshTask) { | |
session(remotes.localhost) { | |
execute 'uname -a' | |
execute 'secret', logging: false | |
execute 'dmesg > /tmp/dmesg' | |
get '/tmp/dmesg', '.' | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh.settings { | |
outputStream = System.out | |
} | |
ssh.run { | |
session(remotes.localhost) { | |
execute 'uname -a' | |
execute 'secret', logging: false | |
new File('dmesg').withOutputStream { stream -> | |
execute 'dmesg', outputStream: stream | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh.settings { | |
logging = 'stdio' | |
} | |
ssh.run { | |
session(remotes.localhost) { | |
execute 'uname -a' | |
execute 'secret', logging: 'none' | |
new File('dmesg').withOutputStream { stream -> | |
execute 'dmesg', outputStream: stream | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment