Sha256: ac6f79e6f6fdb4e8e38eb31d70a8ec4ed4144435826003f9176017ea4200c25f

Contents?: true

Size: 1.22 KB

Versions: 11

Compression:

Stored size: 1.22 KB

Contents

module CORL
module Plugin
class Builder < Nucleon.plugin_class(:nucleon, :base)
  
  include Parallel
  
  extend Mixin::Builder::Global
  include Mixin::Builder::Instance
  
  #-----------------------------------------------------------------------------
  # Builder plugin interface
  
  def normalize(reload)
    super
    yield if block_given?
  end
  
  #-----------------------------------------------------------------------------
  # Checks

  #-----------------------------------------------------------------------------
  # Property accessors / modifiers

  network_settings :builder
  
  #-----------------------------------------------------------------------------
  # Builder operations
 
  def build(node, options = {})
    config        = Config.ensure(options)    
    environment   = Util::Data.ensure_value(config[:environment], node.lookup(:corl_environment))
    configuration = process_environment(export, environment)    
    
    FileUtils.mkdir_p(build_directory)
    
    status = parallel(:build_provider, configuration, environment)
    status.values.include?(false) ? false : true
  end
  
  #---
  
  def build_provider(name, project_reference, environment)
    # Implement in sub classes
    true
  end
end
end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
corl-0.5.12 lib/core/plugin/builder.rb
corl-0.5.11 lib/core/plugin/builder.rb
corl-0.5.10 lib/core/plugin/builder.rb
corl-0.5.9 lib/core/plugin/builder.rb
corl-0.5.8 lib/core/plugin/builder.rb
corl-0.5.7 lib/core/plugin/builder.rb
corl-0.5.6 lib/core/plugin/builder.rb
corl-0.5.5 lib/core/plugin/builder.rb
corl-0.5.4 lib/core/plugin/builder.rb
corl-0.5.3 lib/core/plugin/builder.rb
corl-0.5.2 lib/core/plugin/builder.rb