Class: KuberKit::Core::Image
Instance Attribute Summary collapse
-
#after_build_callback ⇒ Object
readonly
Returns the value of attribute after_build_callback.
-
#before_build_callback ⇒ Object
readonly
Returns the value of attribute before_build_callback.
-
#build_context_dir ⇒ Object
readonly
Returns the value of attribute build_context_dir.
-
#build_vars ⇒ Object
readonly
Returns the value of attribute build_vars.
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#dockerfile_path ⇒ Object
readonly
Returns the value of attribute dockerfile_path.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#registry ⇒ Object
readonly
Returns the value of attribute registry.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
- #build_args ⇒ Object
-
#initialize(name:, dependencies:, registry:, dockerfile_path:, build_vars:, build_context_dir:, tag:, before_build_callback:, after_build_callback:) ⇒ Image
constructor
A new instance of Image.
- #registry_url ⇒ Object
- #remote_registry_url ⇒ Object
Constructor Details
#initialize(name:, dependencies:, registry:, dockerfile_path:, build_vars:, build_context_dir:, tag:, before_build_callback:, after_build_callback:) ⇒ Image
Returns a new instance of Image.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/kuber_kit/core/image.rb', line 16 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 |
Instance Attribute Details
#after_build_callback ⇒ Object (readonly)
Returns the value of attribute after_build_callback.
2 3 4 |
# File 'lib/kuber_kit/core/image.rb', line 2 def after_build_callback @after_build_callback end |
#before_build_callback ⇒ Object (readonly)
Returns the value of attribute before_build_callback.
2 3 4 |
# File 'lib/kuber_kit/core/image.rb', line 2 def before_build_callback @before_build_callback end |
#build_context_dir ⇒ Object (readonly)
Returns the value of attribute build_context_dir.
2 3 4 |
# File 'lib/kuber_kit/core/image.rb', line 2 def build_context_dir @build_context_dir end |
#build_vars ⇒ Object (readonly)
Returns the value of attribute build_vars.
2 3 4 |
# File 'lib/kuber_kit/core/image.rb', line 2 def build_vars @build_vars end |
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
2 3 4 |
# File 'lib/kuber_kit/core/image.rb', line 2 def dependencies @dependencies end |
#dockerfile_path ⇒ Object (readonly)
Returns the value of attribute dockerfile_path.
2 3 4 |
# File 'lib/kuber_kit/core/image.rb', line 2 def dockerfile_path @dockerfile_path end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/kuber_kit/core/image.rb', line 2 def name @name end |
#registry ⇒ Object (readonly)
Returns the value of attribute registry.
2 3 4 |
# File 'lib/kuber_kit/core/image.rb', line 2 def registry @registry end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
2 3 4 |
# File 'lib/kuber_kit/core/image.rb', line 2 def tag @tag end |
Instance Method Details
#build_args ⇒ Object
36 37 38 39 40 41 |
# File 'lib/kuber_kit/core/image.rb', line 36 def build_args unless KuberKit.deprecation_warnings_disabled? puts "WARNING: build_args is deprecated, please use build_vars instead" end build_vars end |
#registry_url ⇒ Object
28 29 30 |
# File 'lib/kuber_kit/core/image.rb', line 28 def registry_url "#{registry.path}/#{name}:#{tag}" end |
#remote_registry_url ⇒ Object
32 33 34 |
# File 'lib/kuber_kit/core/image.rb', line 32 def remote_registry_url "#{registry.remote_path}/#{name}:#{tag}" end |