Class: ActivePostgres::DeploymentFlow
- Inherits:
-
Object
- Object
- ActivePostgres::DeploymentFlow
- Includes:
- ComponentResolver
- Defined in:
- lib/active_postgres/deployment_flow.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#rollback_manager ⇒ Object
readonly
Returns the value of attribute rollback_manager.
-
#secrets ⇒ Object
readonly
Returns the value of attribute secrets.
-
#skip_validation ⇒ Object
readonly
Returns the value of attribute skip_validation.
-
#ssh_executor ⇒ Object
readonly
Returns the value of attribute ssh_executor.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(config, ssh_executor:, secrets:, logger:, rollback_manager:, skip_validation: false) ⇒ DeploymentFlow
constructor
A new instance of DeploymentFlow.
Methods included from ComponentResolver
Constructor Details
#initialize(config, ssh_executor:, secrets:, logger:, rollback_manager:, skip_validation: false) ⇒ DeploymentFlow
Returns a new instance of DeploymentFlow.
7 8 9 10 11 12 13 14 |
# File 'lib/active_postgres/deployment_flow.rb', line 7 def initialize(config, ssh_executor:, secrets:, logger:, rollback_manager:, skip_validation: false) @config = config @ssh_executor = ssh_executor @secrets = secrets @logger = logger @rollback_manager = rollback_manager @skip_validation = skip_validation end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
5 6 7 |
# File 'lib/active_postgres/deployment_flow.rb', line 5 def config @config end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
5 6 7 |
# File 'lib/active_postgres/deployment_flow.rb', line 5 def logger @logger end |
#rollback_manager ⇒ Object (readonly)
Returns the value of attribute rollback_manager.
5 6 7 |
# File 'lib/active_postgres/deployment_flow.rb', line 5 def rollback_manager @rollback_manager end |
#secrets ⇒ Object (readonly)
Returns the value of attribute secrets.
5 6 7 |
# File 'lib/active_postgres/deployment_flow.rb', line 5 def secrets @secrets end |
#skip_validation ⇒ Object (readonly)
Returns the value of attribute skip_validation.
5 6 7 |
# File 'lib/active_postgres/deployment_flow.rb', line 5 def skip_validation @skip_validation end |
#ssh_executor ⇒ Object (readonly)
Returns the value of attribute ssh_executor.
5 6 7 |
# File 'lib/active_postgres/deployment_flow.rb', line 5 def ssh_executor @ssh_executor end |
Instance Method Details
#execute ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/active_postgres/deployment_flow.rb', line 16 def execute ErrorHandler.with_handling(context: { operation: operation_name }) do print_header validate_prerequisites run_preflight_checks unless skip_validation print_deployment_plan return unless confirm_deployment rollback_manager.with_rollback(description: operation_name) do deploy_components end end end |