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.2549.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2546.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2539.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2537.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2534.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2531.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2524.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2513.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2479.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2448.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2446.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2427.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2416.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2411.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2409.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2398.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2384.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2375.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2372.0 lib/bosh/stemcell/os_image_builder.rb
bosh-stemcell-1.2366.0 lib/bosh/stemcell/os_image_builder.rb