Class: EcsDeployer::CLI

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

Instance Method Summary collapse

Instance Method Details

#decryptObject



58
59
60
61
# File 'lib/ecs_deployer/cli.rb', line 58

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

#encryptObject



51
52
53
54
# File 'lib/ecs_deployer/cli.rb', line 51

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

#task_registerObject



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

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



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

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

  puts "Update service: #{result.service_arn}"
end