Class: Soyuz::Deploy

Inherits:
Object
  • Object
show all
Defined in:
lib/soyuz/deploy.rb

Instance Method Summary collapse

Constructor Details

#initialize(env_name, options) ⇒ Deploy

Returns a new instance of Deploy.



4
5
6
7
8
# File 'lib/soyuz/deploy.rb', line 4

def initialize(env_name, options)
  @config = Config.new(options[:config])
  @config.validate!
  set_environment(env_name) if env_name || $non_interactive
end

Instance Method Details

#executeObject



10
11
12
13
14
15
16
# File 'lib/soyuz/deploy.rb', line 10

def execute
  choose_environment unless @environment
  ENV['SOYUZ_ENVIRONMENT'] = @environment.name.to_s
  before_callbacks
  deploy
  after_callbacks
end