Class: DeployController

Inherits:
Object
  • Object
show all
Defined in:
lib/dew/controllers/deploy_controller.rb

Instance Method Summary collapse

Instance Method Details

#create(deploy_type, environment_name, opts) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/dew/controllers/deploy_controller.rb', line 3

def create deploy_type, environment_name, opts
  if Environment.get(environment_name).servers.empty?
    raise "Environment #{environment_name.inspect} doesn't exist or appears to have all instances already terminated"
  end

  Deploy::Run.new(deploy_type, Environment.get(environment_name), opts).deploy
end