Sha256: ce4c2d8774b042b53049fb1e8a66697491122b4e74f95a4c396d53c0876376a0

Contents?: true

Size: 445 Bytes

Versions: 7

Compression:

Stored size: 445 Bytes

Contents

class Kamal::Commands::Registry < Kamal::Commands::Base
  delegate :registry, to: :config

  def login
    docker :login, registry["server"], "-u", sensitive(lookup("username")), "-p", sensitive(lookup("password"))
  end

  def logout
    docker :logout, registry["server"]
  end

  private
    def lookup(key)
      if registry[key].is_a?(Array)
        ENV.fetch(registry[key].first).dup
      else
        registry[key]
      end
    end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kamal-1.3.1 lib/kamal/commands/registry.rb
kamal-1.3.0 lib/kamal/commands/registry.rb
kamal-1.2.0 lib/kamal/commands/registry.rb
kamal-1.1.0 lib/kamal/commands/registry.rb
kamal-1.0.0 lib/kamal/commands/registry.rb
kamal-0.16.1 lib/kamal/commands/registry.rb
kamal-0.16.0 lib/kamal/commands/registry.rb