Class: Pushwagner::Maven::Deployer
- Inherits:
-
Object
- Object
- Pushwagner::Maven::Deployer
- Defined in:
- lib/pushwagner/maven.rb
Overview
Deployer strategy for maven repos (wip).
Instance Attribute Summary collapse
-
#artifacts ⇒ Object
readonly
Returns the value of attribute artifacts.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
Instance Method Summary collapse
- #deploy ⇒ Object
-
#initialize(env, opts = {}) ⇒ Deployer
constructor
A new instance of Deployer.
Constructor Details
#initialize(env, opts = {}) ⇒ Deployer
Returns a new instance of Deployer.
109 110 111 112 113 114 |
# File 'lib/pushwagner/maven.rb', line 109 def initialize(env, opts = {}) @environment = env # TODO: nil-object instead? @artifacts = env.maven? ? env.maven.artifacts : {} @repository = env.maven? ? env.maven.repository : nil end |
Instance Attribute Details
#artifacts ⇒ Object (readonly)
Returns the value of attribute artifacts.
107 108 109 |
# File 'lib/pushwagner/maven.rb', line 107 def artifacts @artifacts end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
107 108 109 |
# File 'lib/pushwagner/maven.rb', line 107 def environment @environment end |
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
107 108 109 |
# File 'lib/pushwagner/maven.rb', line 107 def repository @repository end |
Instance Method Details
#deploy ⇒ Object
116 117 118 119 120 121 122 123 124 125 |
# File 'lib/pushwagner/maven.rb', line 116 def deploy artifacts.each do |name, artifact| environment.hosts.each do |host| mark_previous(name, host) pull_artifact(name, artifact, host) mark_new(name, artifact, host) end end true # false if failed end |