Sha256: f217fb6028378f8123183015b510547623e2ff6f25382b6de2aae85ccba777c3

Contents?: true

Size: 872 Bytes

Versions: 32

Compression:

Stored size: 872 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 '--force', :flag, 'Force deploy even if service does not have any changes'
    option '--force-deploy', :flag, '[DEPRECATED: use --force]'

    def execute
      require_api_url
      token = require_token
      service_id = name
      data = {}
      data[:force] = true if force? || force_deploy? # deprecated
      if force_deploy?
        warning "--force-deploy will deprecate in the future, use --force"
      end
      spinner "Deploying service #{name.colorize(:cyan)} " do
        deployment = deploy_service(token, name, data)
        wait_for_deploy_to_finish(token, deployment)
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
kontena-cli-1.1.0.rc1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.1.0.pre1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.6 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.6.rc1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.5 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.5.rc1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.5.pre1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.4 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.4.rc2 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.4.rc1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.3 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.3.rc1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.2 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.2.rc2 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.2.rc1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.2.pre1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.1.rc3 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.1.rc2 lib/kontena/cli/services/deploy_command.rb
kontena-cli-1.0.1.rc1 lib/kontena/cli/services/deploy_command.rb