Class: EbDeployer::DeploymentStrategy::BlueOnly
- Inherits:
-
Object
- Object
- EbDeployer::DeploymentStrategy::BlueOnly
- Defined in:
- lib/eb_deployer/deployment_strategy/blue_only.rb
Instance Method Summary collapse
- #deploy(version_label, env_settings, inactive_settings = []) ⇒ Object
-
#initialize(component) ⇒ BlueOnly
constructor
A new instance of BlueOnly.
- #test_compatibility(env_create_options) ⇒ Object
Constructor Details
#initialize(component) ⇒ BlueOnly
Returns a new instance of BlueOnly.
4 5 6 |
# File 'lib/eb_deployer/deployment_strategy/blue_only.rb', line 4 def initialize(component) @component = component end |
Instance Method Details
#deploy(version_label, env_settings, inactive_settings = []) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/eb_deployer/deployment_strategy/blue_only.rb', line 15 def deploy(version_label, env_settings, inactive_settings=[]) if !ebenvs.any?(&method(:active_ebenv?)) ebenv('a', @component.cname_prefix). deploy(version_label, env_settings) return end inactive_ebenv = ebenvs.reject(&method(:active_ebenv?)).first inactive_ebenv.deploy(version_label, env_settings) end |
#test_compatibility(env_create_options) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/eb_deployer/deployment_strategy/blue_only.rb', line 8 def test_compatibility() tier = [:tier] if tier && tier.downcase == 'worker' raise "Blue only deployment is not supported for Worker tier" end end |