Sha256: 9de17ef958fd7a84f9dfaa72cabc12259c7295178471cb3566002c8f81b9abad

Contents?: true

Size: 691 Bytes

Versions: 45

Compression:

Stored size: 691 Bytes

Contents

module Kubes::Docker::Strategy::Push
  class Docker < Base
    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

    def push
      params = args.flatten.join(' ')
      command = "docker push #{params}"
      run_hooks("docker.rb", name: "push") do
        sh(command)
      end
    end

    def update_auth_token
      auth = Kubes::Auth.new(image_name)
      auth.run
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
kubes-0.9.3 lib/kubes/docker/strategy/push/docker.rb
kubes-0.9.2 lib/kubes/docker/strategy/push/docker.rb
kubes-0.9.1 lib/kubes/docker/strategy/push/docker.rb
kubes-0.9.0 lib/kubes/docker/strategy/push/docker.rb
kubes-0.8.10 lib/kubes/docker/strategy/push/docker.rb
kubes-0.8.9 lib/kubes/docker/strategy/push/docker.rb
kubes-0.8.8 lib/kubes/docker/strategy/push/docker.rb
kubes-0.8.7 lib/kubes/docker/strategy/push/docker.rb
kubes-0.8.6 lib/kubes/docker/strategy/push/docker.rb
kubes-0.8.5 lib/kubes/docker/strategy/push/docker.rb
kubes-0.8.4 lib/kubes/docker/strategy/push/docker.rb
kubes-0.8.3 lib/kubes/docker/strategy/push/docker.rb
kubes-0.8.2 lib/kubes/docker/strategy/push/docker.rb
kubes-0.8.1 lib/kubes/docker/strategy/push/docker.rb
kubes-0.8.0 lib/kubes/docker/strategy/push/docker.rb
kubes-0.7.10 lib/kubes/docker/strategy/push/docker.rb
kubes-0.7.9 lib/kubes/docker/strategy/push/docker.rb
kubes-0.7.8 lib/kubes/docker/strategy/push/docker.rb
kubes-0.7.7 lib/kubes/docker/strategy/push/docker.rb
kubes-0.7.6 lib/kubes/docker/strategy/push/docker.rb