Class: Physique::OctopusDeployConfig
- Inherits:
-
Object
- Object
- Physique::OctopusDeployConfig
- Defined in:
- lib/physique/task_builders/octopus.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
writeonly
The server name of the deployment server.
-
#server ⇒ Object
writeonly
The server name of the deployment server.
Instance Method Summary collapse
- #deploy_app {|config| ... } ⇒ Object
-
#initialize ⇒ OctopusDeployConfig
constructor
A new instance of OctopusDeployConfig.
-
#no_alias_tasks ⇒ Object
Do not alias the tasks without the ‘octo’ prefix.
- #opts ⇒ Object
Constructor Details
permalink #initialize ⇒ OctopusDeployConfig
Returns a new instance of OctopusDeployConfig.
10 11 12 13 |
# File 'lib/physique/task_builders/octopus.rb', line 10 def initialize @apps = [] @alias_tasks = true end |
Instance Attribute Details
permalink #api_key=(value) ⇒ Object (writeonly)
The server name of the deployment server
7 8 9 |
# File 'lib/physique/task_builders/octopus.rb', line 7 def api_key=(value) @api_key = value end |
permalink #server=(value) ⇒ Object (writeonly)
The server name of the deployment server
7 8 9 |
# File 'lib/physique/task_builders/octopus.rb', line 7 def server=(value) @server = value end |
Instance Method Details
permalink #deploy_app {|config| ... } ⇒ Object
20 21 22 23 24 |
# File 'lib/physique/task_builders/octopus.rb', line 20 def deploy_app config = OctopusDeployAppConfig.new yield config @apps << config end |
permalink #no_alias_tasks ⇒ Object
Do not alias the tasks without the ‘octo’ prefix.
16 17 18 |
# File 'lib/physique/task_builders/octopus.rb', line 16 def no_alias_tasks @alias_tasks = false end |
permalink #opts ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/physique/task_builders/octopus.rb', line 26 def opts raise ArgumentError, 'You must specify a server to deploy to' if @server.blank? raise ArgumentError, 'You must specify at least one application to deploy' if @apps.blank? Map.new({ server: @server, api_key: @api_key, alias_tasks: @alias_tasks, apps: @apps.map { |a| a.opts } }) end |