Class: Phase::Deploy::Deployment
- Inherits:
-
Object
- Object
- Phase::Deploy::Deployment
- Includes:
- Util::Console, Util::Shell
- Defined in:
- lib/phase/kit/deploy/deployment.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#role_name ⇒ Object
readonly
Returns the value of attribute role_name.
-
#version_tag ⇒ Object
readonly
Returns the value of attribute version_tag.
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize(role_name, version_tag, options = {}) ⇒ Deployment
constructor
A new instance of Deployment.
Methods included from Util::Shell
Methods included from Util::Console
Constructor Details
#initialize(role_name, version_tag, options = {}) ⇒ Deployment
Returns a new instance of Deployment.
10 11 12 |
# File 'lib/phase/kit/deploy/deployment.rb', line 10 def initialize(role_name, version_tag, = {}) @role_name, @version_tag, @options = role_name, version_tag, end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/phase/kit/deploy/deployment.rb', line 8 def @options end |
#role_name ⇒ Object (readonly)
Returns the value of attribute role_name.
8 9 10 |
# File 'lib/phase/kit/deploy/deployment.rb', line 8 def role_name @role_name end |
#version_tag ⇒ Object (readonly)
Returns the value of attribute version_tag.
8 9 10 |
# File 'lib/phase/kit/deploy/deployment.rb', line 8 def version_tag @version_tag end |
Instance Method Details
#execute! ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/phase/kit/deploy/deployment.rb', line 14 def execute! hosts = ::Phase::Adapters::AWS::Server.where(role: role_name).map do |host| "deploy@#{host.resource.dns_name}" end fail "No instance with role `role_name' found" if hosts.blank? deploy_image(hosts) end |