lib/container_ship/cli.rb in container_ship-0.1.2 vs lib/container_ship/cli.rb in container_ship-0.1.3
- old
+ new
@@ -14,11 +14,13 @@
def ship(cluster_name, service_name, environment, build_number)
Command::ShipCommand.new.run(cluster_name, service_name, environment, build_number)
end
desc 'exec CLUSTER_NAME SERVICE_NAME ENVIRONMENT BUILD_NUMBER', 'exec specified task'
+ method_option 'timeout', desc: 'Timeout seconds for executing the task. Default 5 minutes.'
def exec(cluster_name, service_name, environment, build_number)
- Command::ExecCommand.new.run(cluster_name, service_name, environment, build_number)
+ timeout = options['timeout']&.to_i || 300
+ Command::ExecCommand.new.run(cluster_name, service_name, environment, build_number, timeout: timeout)
end
desc 'version', 'display gem version'
def version
say ContainerShip::VERSION