Sha256: 9bdc4d99418a18eef5b21be6eb8963e7c791d4095b49ba1eeaba25b152af7a99
Contents?: true
Size: 742 Bytes
Versions: 38
Compression:
Stored size: 742 Bytes
Contents
module Kubes::Docker::Args class Default def initialize(name, image_name, options={}) @name, @image_name, @options = name.to_s, image_name, options @dockerfile = "Dockerfile" end def args case @name when "build" build_args when "push" [@image_name] else [] end end def build_args ["-t #{@image_name} -f #{@dockerfile} ."] end private def common_args %w[--recursive -f ] end def resource_path [".kubes/output", @options[:role], resource].compact.join('/') end def resource return unless r = @options[:resource] # intentional assignment r.include?(".yaml") ? r : "#{r}.yaml" end end end
Version data entries
38 entries across 38 versions & 1 rubygems