Class: Ufo::CLI
- Inherits:
-
Thor
- Object
- Thor
- Ufo::CLI
- Defined in:
- lib/ufo/cli.rb,
lib/ufo/cli/help.rb
Defined Under Namespace
Classes: Help
Instance Method Summary collapse
Instance Method Details
#destroy(service) ⇒ Object
126 127 128 129 |
# File 'lib/ufo/cli.rb', line 126 def destroy(service) task_definition = [:task] || service # convention Destroy.new(service, ).bye end |
#scale(service, count) ⇒ Object
133 134 135 |
# File 'lib/ufo/cli.rb', line 133 def scale(service, count) Scale.new(service, count, ).update end |
#ship(service) ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/ufo/cli.rb', line 97 def ship(service) builder = DockerBuilder.new() # outside if because it need docker.full_image_name if [:docker] builder.build builder.push end # task definition and deploy logic are coupled in the Ship class. # Example: We need to know if the task defintion is a web service to see if we need to # add the elb target group. The web service information is in the TasksBuilder # and the elb target group gets set in the Ship class. # So we always call these together. TasksBuilder.new().build TasksRegister.register(service, ) task_definition = [:task] || service # convention ship = Ship.new(service, task_definition, ) return if ENV['TEST'] # to allow me to quickly test most of the ship CLI portion only ship.deploy if [:docker] DockerCleaner.new(builder.image_name, ).cleanup EcrCleaner.new(builder.image_name, ).cleanup end puts "Docker image shipped: #{builder.full_image_name.green}" end |