Sha256: 8375e5d8695784967d9819e3c0e3d05cec60123236adeefd1c3ee942dcc51671

Contents?: true

Size: 937 Bytes

Versions: 29

Compression:

Stored size: 937 Bytes

Contents

require_relative '../common'

module Kontena::Cli::Stacks::Registry
  class RemoveCommand < Kontena::Command
    include Kontena::Cli::Common
    include Kontena::Cli::Stacks::Common
    include Kontena::Cli::Stacks::Common::RegistryNameParam

    banner "Removes a stack (or version) from the stack registry. Use user/stack_name or user/stack_name:version."

    option ['-f', '--force'], :flag, "Force delete"

    requires_current_account_token

    def execute
      unless force?
        if stack_name.version
          puts "About to delete #{pastel.cyan("#{stack_name}")} from the stacks registry"
          confirm
        else
          puts "About to delete an entire stack and all of its versions from the stacks registry"
          confirm_command(stack_name)
        end
      end
      spinner "Removing #{pastel.cyan(stack_name)} from the registry" do
        stacks_client.destroy(stack_name)
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
krates-1.7.11 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.7.10 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.7.9 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.7.8 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.7.7 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.7.6 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.7.5 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.7.4 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.7.3 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.7.2 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.7.1 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.7.0 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.6.9 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.6.8 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.6.7 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.6.6 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.6.5 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.6.4 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.6.3 lib/kontena/cli/stacks/registry/remove_command.rb
krates-1.6.2 lib/kontena/cli/stacks/registry/remove_command.rb