Sha256: 3b13b68befc59aecb3079823878a3ae6a3ee69c028103d0eb34cc25d91824db6

Contents?: true

Size: 710 Bytes

Versions: 32

Compression:

Stored size: 710 Bytes

Contents

module Kontena::Cli::ExternalRegistries
  class AddCommand < Clamp::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions

    parameter '[URL]', 'Docker Registry url', default: 'https://index.docker.io/v2/'

    option ['-u', '--username'], 'USERNAME', 'Username', required: true
    option ['-e', '--email'], 'EMAIL', 'Email', required: true
    option ['-p', '--password'], 'PASSWORD', 'Password', required: true

    def execute
      require_api_url
      require_current_grid
      token = require_token

      data = { username: username, password: password, email: email, url: url }
      client(token).post("grids/#{current_grid}/external_registries", data)
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
kontena-cli-0.15.5 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.15.5.rc2 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.15.5.rc1 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.15.4 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.15.4.rc2 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.15.4.rc1 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.15.4.pre1 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.15.3 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.15.2 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.15.1 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.15.0 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.15.0.rc3 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.15.0.rc2 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.15.0.rc1 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.14.7 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.14.6 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.14.5 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.14.4 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.14.3 lib/kontena/cli/external_registries/add_command.rb
kontena-cli-0.14.2 lib/kontena/cli/external_registries/add_command.rb