Sha256: 687f7d1c1b133eef8da6ebd2551e48f43489478b72742ac3f40edcf77b380b84
Contents?: true
Size: 1.14 KB
Versions: 63
Compression:
Stored size: 1.14 KB
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 build_options = ["-t=#{image.registry_url}"] # use quite option for api mode ui, so it will only return built image id if KuberKit.ui_mode == :api build_options << "-q" end build_result = docker_commands.build(shell, build_dir, build_options) 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 build_result end end
Version data entries
63 entries across 63 versions & 1 rubygems