Class: Services::EnvironmentClusterCloner
- Inherits:
-
Object
- Object
- Services::EnvironmentClusterCloner
- Defined in:
- lib/busbar_cli/services/environment_cluster_cloner.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(environment, environment_clone_name, destination_cluster, profile) ⇒ EnvironmentClusterCloner
constructor
A new instance of EnvironmentClusterCloner.
Constructor Details
#initialize(environment, environment_clone_name, destination_cluster, profile) ⇒ EnvironmentClusterCloner
Returns a new instance of EnvironmentClusterCloner.
7 8 9 10 11 12 |
# File 'lib/busbar_cli/services/environment_cluster_cloner.rb', line 7 def initialize(environment, environment_clone_name, destination_cluster, profile) @environment = environment @environment_clone_name = environment_clone_name @destination_cluster = destination_cluster @profile = profile end |
Class Method Details
.call(environment:, environment_clone_name:, destination_cluster:, profile:) ⇒ Object
3 4 5 |
# File 'lib/busbar_cli/services/environment_cluster_cloner.rb', line 3 def self.call(environment:, environment_clone_name:, destination_cluster:, profile:) new(environment, environment_clone_name, destination_cluster, profile).call end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/busbar_cli/services/environment_cluster_cloner.rb', line 14 def call raise_environment_clone_issue if environment_exist_on_destination? if app_exist_on_destination? clone_environment else clone_app_and_environment end puts 'Remember to scale the app components' end |