Method: Docman::Application#execute

Defined in:
lib/application.rb

#execute(action, state, name = nil, tag = nil) ⇒ Object



217
218
219
220
221
222
223
224
225
226
# File 'lib/application.rb', line 217

def execute(action, state, name = nil, tag = nil)
  params = Marshal.load(Marshal.dump(@deploy_target))
  params['state'] = state
  params['action'] = action
  params['name'] = name
  params['tag'] = tag ? tag : state + '-' + Time.now.strftime("%Y-%m-%d-%H-%M-%S")
  params['environment'] = @config['environments'][@deploy_target['states'][state]]
  params['environment_name'] = @deploy_target['states'][state]
  Docman::Deployers::Deployer.create(params, nil, self).perform
end