Sha256: a7497502d787ed671f18988f3f436f169df1fe3b49eb4dd17ef4400acb7e2007

Contents?: true

Size: 832 Bytes

Versions: 10

Compression:

Stored size: 832 Bytes

Contents

require 'fileutils'
require 'bosh/stemcell/stage_collection'

module Bosh::Stemcell
  class StemcellBuilder
    def initialize(dependencies = {})
      @gem_components = dependencies.fetch(:gem_components)
      @environment = dependencies.fetch(:environment)
      @runner = dependencies.fetch(:runner)
      @collection = dependencies.fetch(:collection)
    end

    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

    private

    attr_reader :gem_components, :environment, :collection, :runner
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bosh-stemcell-1.3262.24.0 lib/bosh/stemcell/stemcell_builder.rb
bosh-stemcell-1.3232.24.0 lib/bosh/stemcell/stemcell_builder.rb
bosh-stemcell-1.3232.14.0 lib/bosh/stemcell/stemcell_builder.rb
bosh-stemcell-1.3262.4.0 lib/bosh/stemcell/stemcell_builder.rb
bosh-stemcell-1.3262.0 lib/bosh/stemcell/stemcell_builder.rb
bosh-stemcell-1.3232.0 lib/bosh/stemcell/stemcell_builder.rb
bosh-stemcell-1.3215.4.0 lib/bosh/stemcell/stemcell_builder.rb
bosh-stemcell-1.3215.3.0 lib/bosh/stemcell/stemcell_builder.rb
bosh-stemcell-1.3215.0 lib/bosh/stemcell/stemcell_builder.rb
bosh-stemcell-1.3213.0 lib/bosh/stemcell/stemcell_builder.rb