Class: KuberKit::ImageCompiler::Compiler

Inherits:
Object
  • Object
show all
Defined in:
lib/kuber_kit/image_compiler/compiler.rb

Instance Method Summary collapse

Instance Method Details

#compile(shell, image, builds_dir) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/kuber_kit/image_compiler/compiler.rb', line 9

def compile(shell, image, builds_dir)
  image_build_dir = File.join(builds_dir, image.name.to_s)

  context_helper = context_helper_factory.build_image_context(shell, image)
  image_build_dir_creator.create(shell, image, image_build_dir, context_helper: context_helper)

  result = image_builder.build(shell, image, image_build_dir, context_helper: context_helper)
  image_build_dir_creator.cleanup(shell, image_build_dir)

  result
end