Sha256: 6fbc20f99b63e9e0d344c8f2fe3889f000f721b98832760826123d1fb043736b

Contents?: true

Size: 1.33 KB

Versions: 61

Compression:

Stored size: 1.33 KB

Contents

class KuberKit::Core::Image
  attr_reader :name, :dependencies, :registry, :dockerfile_path, :build_vars, :build_context_dir, :tag, 
              :before_build_callback, :after_build_callback

  Contract KeywordArgs[
    name:               Symbol,
    dependencies:       ArrayOf[Symbol],
    registry:           Maybe[KuberKit::Core::Registries::Registry],
    dockerfile_path:    String,
    build_vars:         Hash,
    build_context_dir:  Maybe[String],
    tag:                String,
    before_build_callback: Maybe[Proc],
    after_build_callback:  Maybe[Proc]
  ] => Any
  def initialize(name:, dependencies:, registry:, dockerfile_path:, build_vars:, build_context_dir:, tag:, before_build_callback:, after_build_callback:)
    @name = name
    @dependencies = dependencies
    @registry = registry
    @dockerfile_path = dockerfile_path
    @build_vars = build_vars
    @build_context_dir = build_context_dir
    @tag = tag
    @before_build_callback = before_build_callback
    @after_build_callback = after_build_callback
  end

  def registry_url
    "#{registry.path}/#{name}:#{tag}"
  end

  def remote_registry_url
    "#{registry.remote_path}/#{name}:#{tag}"
  end

  def build_args
    unless KuberKit.deprecation_warnings_disabled?
      puts "WARNING: build_args is deprecated, please use build_vars instead"
    end
    build_vars
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
kuber_kit-1.1.2 lib/kuber_kit/core/image.rb
kuber_kit-1.2.1 lib/kuber_kit/core/image.rb
kuber_kit-1.2.0 lib/kuber_kit/core/image.rb
kuber_kit-1.1.1 lib/kuber_kit/core/image.rb
kuber_kit-1.0.1 lib/kuber_kit/core/image.rb
kuber_kit-1.0.0 lib/kuber_kit/core/image.rb
kuber_kit-0.9.9 lib/kuber_kit/core/image.rb
kuber_kit-0.9.8 lib/kuber_kit/core/image.rb
kuber_kit-0.9.7 lib/kuber_kit/core/image.rb
kuber_kit-0.9.6 lib/kuber_kit/core/image.rb
kuber_kit-0.9.5 lib/kuber_kit/core/image.rb
kuber_kit-0.9.4 lib/kuber_kit/core/image.rb
kuber_kit-0.9.3 lib/kuber_kit/core/image.rb
kuber_kit-0.9.2 lib/kuber_kit/core/image.rb
kuber_kit-0.9.1 lib/kuber_kit/core/image.rb
kuber_kit-0.9.0 lib/kuber_kit/core/image.rb
kuber_kit-0.8.8 lib/kuber_kit/core/image.rb
kuber_kit-0.8.7 lib/kuber_kit/core/image.rb
kuber_kit-0.8.6 lib/kuber_kit/core/image.rb
kuber_kit-0.8.5 lib/kuber_kit/core/image.rb