Sha256: f75b7cfd8ad8961e4cc031f71d721733a232c16f669f02c56176b5af45763289

Contents?: true

Size: 605 Bytes

Versions: 109

Compression:

Stored size: 605 Bytes

Contents

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

    def build(os_image_path)
      environment.prepare_build
      runner.configure_and_apply(collection.operating_system_stages)
      archive_handler.compress(environment.chroot_dir, os_image_path)
    end

    private

    attr_reader :environment, :collection, :runner, :archive_handler
  end
end

Version data entries

109 entries across 109 versions & 1 rubygems

Version Path
bosh-stemcell-1.2361.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2355.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2354.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2347.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2341.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2334.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2311.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2291.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2200.0 lib/bosh/stemcell/os_image_builder.rb