class Opsicle::Deploy
Attributes
client[R]
Public Class Methods
new(environment)
click to toggle source
# File lib/opsicle/commands/deploy.rb, line 8 def initialize(environment) @environment = environment @client = Client.new(environment) end
Public Instance Methods
execute(options={ monitor: true })
click to toggle source
# File lib/opsicle/commands/deploy.rb, line 13 def execute(options={ monitor: true }) Output.say "Starting OpsWorks deploy..." #so this is how to format the command arguments: #http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/OpsWorks/Client.html#create_deployment-instance_method command_args = {} command_args["migrate"] = [options[:migrate].to_s] if options[:migrate] command_opts = {} command_opts["custom_json"] = options.delete(:json) if options[:json] response = client.run_command('deploy', command_args, command_opts) launch_stack_monitor(response, options) end