Sha256: 9fab93afcb449e9686b596705823ab77b7d4bd3d1d266c46ff00b03ed6c82274

Contents?: true

Size: 713 Bytes

Versions: 51

Compression:

Stored size: 713 Bytes

Contents

require_relative '../common'

module Kontena::Cli::Stacks::Registry
  class PushCommand < Kontena::Command
    include Kontena::Cli::Common
    include Kontena::Cli::Stacks::Common

    banner "Pushes (uploads) a stack to the stack registry"

    parameter "FILENAME", "Stack file path"

    requires_current_account_token

    def execute
      file = Kontena::Cli::Stacks::YAML::Reader.new(
        filename,
        skip_variables: true,
        skip_validation: true
      )
      name = "#{file.stack_name}:#{file.stack_version}"
      spinner("Pushing #{pastel.cyan(name)} to stacks registry") do
        stacks_client.push(file.stack_name, file.stack_version, file.raw_content)
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
kontena-cli-1.3.5 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.3.5.rc1 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.4.0.pre6 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.4.0.pre5 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.4.0.pre4 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.4.0.pre3 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.4.0.pre2 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.4.0.pre1 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.3.4 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.3.4.rc1 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.3.3 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.3.3.rc1 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.3.2 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.3.2.rc2 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.3.2.rc1 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.3.1 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.3.1.rc2 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.3.1.rc1 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.3.0 lib/kontena/cli/stacks/registry/push_command.rb
kontena-cli-1.3.0.rc4 lib/kontena/cli/stacks/registry/push_command.rb