Class: Jets::Command::Rollback
- Inherits:
-
Object
- Object
- Jets::Command::Rollback
- Includes:
- ApiHelpers
- Defined in:
- lib/jets/commands/rollback/rollback_command.rb
Instance Attribute Summary collapse
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Rollback
constructor
A new instance of Rollback.
- #run ⇒ Object
Methods included from ApiHelpers
#check_for_error_message!, #no_token_exit!, #paging_params
Constructor Details
#initialize(options = {}) ⇒ Rollback
Returns a new instance of Rollback.
15 16 17 18 |
# File 'lib/jets/commands/rollback/rollback_command.rb', line 15 def initialize(={}) @options = @version = [:version] end |
Instance Attribute Details
#version ⇒ Object (readonly)
Returns the value of attribute version.
14 15 16 |
# File 'lib/jets/commands/rollback/rollback_command.rb', line 14 def version @version end |
Instance Method Details
#run ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/jets/commands/rollback/rollback_command.rb', line 20 def run no_token_exit! Jets.boot payload = Release.new(@options).get(version) (payload) puts "Rolling back to version #{version}" # Download previous cfn templates Jets::Cfn::Download.new.download_templates(version) # Run cloudformation update Jets::Cfn::Ship.new(@options.merge(rollback_version: version)).run # also creates the Jets Api deployment record end |