class Kubes::Docker::Strategy::Push::Docker

Public Instance Methods

push() click to toggle source
# File lib/kubes/docker/strategy/push/docker.rb, line 17
def push
  params = args.flatten.join(' ')
  command = "docker push #{params}"
  run_hooks("docker.rb", name: "push") do
    sh(command)
  end
end
run() click to toggle source
# File lib/kubes/docker/strategy/push/docker.rb, line 3
def run
  update_auth_token
  start_time = Time.now
  message = "Pushed #{image_name} docker image."
  if @options[:noop]
    message = "NOOP #{message}"
  else
    push
  end
  took = Time.now - start_time
  message << "\nDocker push took #{pretty_time(took)}.".color(:green)
  logger.info message
end
update_auth_token() click to toggle source
# File lib/kubes/docker/strategy/push/docker.rb, line 25
def update_auth_token
  auth = Kubes::Auth.new(image_name)
  auth.run
end