Class: Kubes::CLI::Build

Inherits:
Base
  • Object
show all
Defined in:
lib/kubes/cli/build.rb

Instance Method Summary collapse

Methods inherited from Base

#compile, #initialize, #pod_name

Methods included from Logging

#logger

Constructor Details

This class inherits a constructor from Kubes::CLI::Base

Instance Method Details

#build?Boolean

Returns:

  • (Boolean)


9
10
11
12
# File 'lib/kubes/cli/build.rb', line 9

def build?
  return false if @options[:build] == false || @options[:image] || Kubes.config.image
  @options[:resource].nil? || @options[:resource] == "deployment"
end

#runObject



3
4
5
6
7
# File 'lib/kubes/cli/build.rb', line 3

def run
  return unless build?
  Kubes::Docker.new(@options, "build").run
  Kubes::Docker.new(@options, "push").run
end