Class: EcsDeployer::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/ecs_deployer/cli.rb

Instance Method Summary collapse

Instance Method Details

#decryptObject



60
61
62
63
# File 'lib/ecs_deployer/cli.rb', line 60

def decrypt
  cipher = EcsDeployer::Util::Cipher.new(@aws_options)
  puts "Decrypted value: #{cipher.decrypt(options[:value])}"
end

#encryptObject



53
54
55
56
# File 'lib/ecs_deployer/cli.rb', line 53

def encrypt
  cipher = EcsDeployer::Util::Cipher.new(@aws_options)
  puts "Encrypted value: #{cipher.encrypt(options[:master_key], options[:value])}"
end

#task_registerObject



28
29
30
31
32
33
34
# File 'lib/ecs_deployer/cli.rb', line 28

def task_register
  path = File.expand_path(options[:path], Dir.pwd)
  task_client = EcsDeployer::Task::Client.new(@aws_options)
  result = task_client.register(path, options[:replace_variables])

  puts "Registered task: #{result.task_definition_arn}"
end

#update_serviceObject



41
42
43
44
45
46
47
48
# File 'lib/ecs_deployer/cli.rb', line 41

def update_service
  deploy_client = EcsDeployer::Client.new(options[:cluster], @logger, @aws_options)
  service_client = deploy_client.service
  service_client.wait_timeout = options[:wait_timeout]
  result = service_client.update(options[:service], nil, options[:wait])

  puts "Service has been successfully updated: #{result.service_arn}"
end