Sha256: 075a8dddfe53ef9f5731e0f2acb6c3f6c99e44d13b21a1ad3e5740f6a3dedba6

Contents?: true

Size: 683 Bytes

Versions: 16

Compression:

Stored size: 683 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-deploy', :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_deploy?
      spinner "Deploying service #{name.colorize(:cyan)} " do
        deploy_service(token, name, data)
        wait_for_deploy_to_finish(token, parse_service_id(name))
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
kontena-cli-0.16.3 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.3.rc1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.2 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.2.rc1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.1.rc3 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.1.rc2 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.1.rc1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.0 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.0.rc3 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.0.rc2 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.0.rc1 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.0.pre9 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.0.pre8 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.0.pre7 lib/kontena/cli/services/deploy_command.rb
kontena-cli-0.16.0.pre6 lib/kontena/cli/services/deploy_command.rb