Class: EcsDeployCli::CLI
- Inherits:
-
Thor
- Object
- Thor
- EcsDeployCli::CLI
- Defined in:
- lib/ecs_deploy_cli/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
- #deploy ⇒ Object
- #deploy_scheduled_tasks ⇒ Object
- #deploy_services ⇒ Object
- #diff ⇒ Object
- #run_task(task_name) ⇒ Object
- #setup ⇒ Object
- #ssh ⇒ Object
- #validate ⇒ Object
- #version ⇒ Object
Class Method Details
.exit_on_failure? ⇒ Boolean
5 6 7 |
# File 'lib/ecs_deploy_cli/cli.rb', line 5 def self.exit_on_failure? true end |
Instance Method Details
#deploy ⇒ Object
55 56 57 58 59 |
# File 'lib/ecs_deploy_cli/cli.rb', line 55 def deploy @parser = load([:file]) runner.update_services! timeout: [:timeout] runner.update_crons! end |
#deploy_scheduled_tasks ⇒ Object
38 39 40 41 |
# File 'lib/ecs_deploy_cli/cli.rb', line 38 def deploy_scheduled_tasks @parser = load([:file]) runner.update_crons! end |
#deploy_services ⇒ Object
47 48 49 50 |
# File 'lib/ecs_deploy_cli/cli.rb', line 47 def deploy_services @parser = load([:file]) runner.update_services! timeout: [:timeout], service: [:only] end |
#diff ⇒ Object
19 20 21 22 |
# File 'lib/ecs_deploy_cli/cli.rb', line 19 def diff @parser = load([:file]) runner.diff end |
#run_task(task_name) ⇒ Object
66 67 68 69 70 71 72 73 74 |
# File 'lib/ecs_deploy_cli/cli.rb', line 66 def run_task(task_name) @parser = load([:file]) runner.run_task!( task_name, launch_type: [:launch_type], security_groups: [:security_groups].split(','), subnets: [:subnets].split(',') ) end |
#setup ⇒ Object
31 32 33 34 |
# File 'lib/ecs_deploy_cli/cli.rb', line 31 def setup @parser = load([:file]) runner.setup! end |
#ssh ⇒ Object
80 81 82 83 84 |
# File 'lib/ecs_deploy_cli/cli.rb', line 80 def ssh @parser = load([:file]) = { family: [:task], service_name: [:service] }.delete_if { |_, v| v.nil? } runner.ssh(**) end |
#validate ⇒ Object
11 12 13 14 15 |
# File 'lib/ecs_deploy_cli/cli.rb', line 11 def validate @parser = load([:file]) runner.validate! puts 'Your ECSFile looks fine! 🎉' end |
#version ⇒ Object
25 26 27 |
# File 'lib/ecs_deploy_cli/cli.rb', line 25 def version puts "ECS Deploy CLI Version #{EcsDeployCli::VERSION}." end |