Class: Kubes::Docker::Strategy::Build::Base
- Inherits:
-
Object
- Object
- Kubes::Docker::Strategy::Build::Base
- Extended by:
- Memoist
- Includes:
- Utils
- Defined in:
- lib/kubes/docker/strategy/build/base.rb
Instance Method Summary collapse
- #check_dockerfile! ⇒ Object
-
#initialize(options, name) ⇒ Base
constructor
A new instance of Base.
- #run ⇒ Object
Methods included from Hooks::Concern
Methods included from ImageName
#args, #custom, #default, #generate_name, #git_sha, #image_name, #image_state_path, #read_image_name, #repo, #reserve_image_name, #store_image_name
Methods included from Util::Time
Methods included from Util::Sh
Methods included from Logging
Constructor Details
#initialize(options, name) ⇒ Base
Returns a new instance of Base.
6 7 8 |
# File 'lib/kubes/docker/strategy/build/base.rb', line 6 def initialize(, name) @options, @name = , name end |
Instance Method Details
#check_dockerfile! ⇒ Object
17 18 19 20 21 22 |
# File 'lib/kubes/docker/strategy/build/base.rb', line 17 def check_dockerfile! # Dockerfile is also used in args/default.rb, will have to combine if Dockerfile is made configurable return if File.exist?("Dockerfile") logger.error "ERROR: The Dockerfile does not exist. Cannot build the docker image without a Dockerfile".color(:red) exit 1 end |
#run ⇒ Object
10 11 12 13 14 15 |
# File 'lib/kubes/docker/strategy/build/base.rb', line 10 def run reserve_image_name check_dockerfile! perform store_image_name end |