Sha256: e5435bd6d409ea80aabb9e8f22d0c7ec819ded709eb3d88146707444b679ce66

Contents?: true

Size: 764 Bytes

Versions: 18

Compression:

Stored size: 764 Bytes

Contents

require_relative 'services_helper'

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

    parameter "NAME", "Service name"
    option '--[no-]wait', :flag, 'Do not wait for service deployment', default: true
    option '--force', :flag, 'Force deploy even if service does not have any changes'

    def execute
      require_api_url
      token = require_token
      service_id = name
      data = {}
      data[:force] = true if force?
      spinner "Deploying service #{name.colorize(:cyan)} " do
        deployment = deploy_service(token, name, data)
        wait_for_deploy_to_finish(token, deployment) if wait?
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
kontena-cli-1.4.3 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.3.rc1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.2 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.2.rc1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.2.pre1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.1.rc1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.1.pre1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.0 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.0.rc2 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.0.rc1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.0.pre14 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.0.pre13 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.0.pre12 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.0.pre11 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.0.pre10 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.0.pre9 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.4.0.pre8 lib/kontena/cli/services/deploy_command.rb