Sha256: 89e58673a91a940bdcba833f4ed2433c086f0130bf1b16f375e55ba92caf091f

Contents?: true

Size: 950 Bytes

Versions: 29

Compression:

Stored size: 950 Bytes

Contents

class KuberKit::ImageCompiler::ImageBuilder
  include KuberKit::Import[
    "shell.docker_commands",
    "image_compiler.version_tag_builder"
  ]

  Contract KuberKit::Shell::AbstractShell, KuberKit::Core::Image, String, KeywordArgs[
    context_helper: Maybe[KuberKit::Core::ContextHelper::BaseHelper::CONTRACT]
  ] => Any
  def build(shell, image, build_dir, context_helper: nil)
    image.before_build_callback.call(context_helper, build_dir) if image.before_build_callback

    docker_commands.build(shell, build_dir, ["-t=#{image.registry_url}"])

    version_tag = version_tag_builder.get_version
    docker_commands.tag(shell, image.registry_url, version_tag)

    if image.registry.remote?
      docker_commands.tag(shell, image.registry_url, image.remote_registry_url)
      docker_commands.push(shell, image.remote_registry_url)
    end

    image.after_build_callback.call(context_helper, build_dir) if image.after_build_callback
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
kuber_kit-0.3.11 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.3.10 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.3.9 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.3.8 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.3.7 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.3.6 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.3.5 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.3.4 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.3.3 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.3.2 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.3.1 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.3.0 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.2.9 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.2.8 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.2.7 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.2.6 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.2.5 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.2.4 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.2.3 lib/kuber_kit/image_compiler/image_builder.rb
kuber_kit-0.2.2 lib/kuber_kit/image_compiler/image_builder.rb