Class: Bosh::Stemcell::StemcellBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/stemcell/stemcell_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(dependencies = {}) ⇒ StemcellBuilder

Returns a new instance of StemcellBuilder.


6
7
8
9
10
11
# File 'lib/bosh/stemcell/stemcell_builder.rb', line 6

def initialize(dependencies = {})
  @gem_components = dependencies.fetch(:gem_components)
  @environment = dependencies.fetch(:environment)
  @runner = dependencies.fetch(:runner)
  @collection = dependencies.fetch(:collection)
end

Instance Method Details

#buildObject


13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/bosh/stemcell/stemcell_builder.rb', line 13

def build
  unless 'no' == ENV['BOSH_MICRO_ENABLED']
    gem_components.build_release_gems
  end

  environment.prepare_build

  stemcell_stages = collection.extract_operating_system_stages +
    collection.agent_stages +
    collection.build_stemcell_image_stages
  runner.configure_and_apply(stemcell_stages, ENV['resume_from'])
end