From ddd160afb1fd2c729cf806de879add5a15cafe31 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 8 Apr 2015 18:14:09 -0700 Subject: added `leap history` command to dump the recent deploy history to console --- lib/leap_cli/commands/deploy.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/leap_cli/commands') diff --git a/lib/leap_cli/commands/deploy.rb b/lib/leap_cli/commands/deploy.rb index a0b7c20..394ea61 100644 --- a/lib/leap_cli/commands/deploy.rb +++ b/lib/leap_cli/commands/deploy.rb @@ -84,6 +84,22 @@ module LeapCli end end + desc 'Display recent deployment history for a set of nodes.' + long_desc 'The FILTER can be the name of a node, service, or tag.' + arg_name 'FILTER' + command [:history, :h] do |c| + c.flag :port, :desc => 'Override the default SSH port.', + :arg_name => 'PORT' + c.flag :ip, :desc => 'Override the default SSH IP address.', + :arg_name => 'IPADDRESS' + c.action do |global,options,args| + nodes = manager.filter!(args) + ssh_connect(nodes, connect_options(options)) do |ssh| + ssh.leap.history + end + end + end + private # -- cgit v1.2.3