Sha256: d5888cbada0ef7b91212e5beb03085710383adc29b243dbd225fdca6f7db5a7d

Contents?: true

Size: 712 Bytes

Versions: 10

Compression:

Stored size: 712 Bytes

Contents

require_relative 'services_helper'

module Kontena::Cli::Services
  class DeployCommand < Clamp::Command
    include Kontena::Cli::Common
    include ServicesHelper

    parameter "NAME", "Service name"
    option '--strategy', 'STRATEGY', 'Define deploy strategy (ha / random)'
    option '--wait-for-port', 'WAIT_FOR_PORT', 'Wait for given container port to open before deploying next container'

    def execute
      require_api_url
      token = require_token
      service_id = name
      data = {}
      data[:strategy] = strategy if strategy
      data[:wait_for_port] = wait_for_port if wait_for_port
      deploy_service(token, service_id, data)
      show_service(token, service_id)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kontena-cli-0.9.3 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.9.2 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.9.1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.9.0 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.8.4 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.8.3 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.8.2 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.8.1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.8.0.1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.8.0 lib/kontena/cli/services/deploy_command.rb