Sha256: 55070e1c94986c2778efbb15c49a59b318b87a2ac3cc51d24306279a82156491

Contents?: true

Size: 1.14 KB

Versions: 7

Compression:

Stored size: 1.14 KB

Contents

module CORL
module Builder
class Project < Nucleon.plugin_class(:CORL, :builder)

  #-----------------------------------------------------------------------------
  # Project interface operations

  def build_provider(provider_path, project_reference, environment)
    path    = provider_path.to_s
    success = true

    info("Building project #{purple(project_reference)} into #{green(path)}", { :i18n => false })

    full_directory = File.join(network.directory, path)
    project        = build_config.manage(:project, extended_config(:project, {
      :directory     => full_directory,
      :url           => project_reference,
      :create        => File.directory?(full_directory) ? false : true,
      :pull          => true,
      :internal_ip   => CORL.public_ip, # Needed for seeding Vagrant VMs
      :manage_ignore => false,
      :corl_file     => false
    }))
    unless project
      warn("Project #{cyan(path)} failed to initialize", { :i18n => false })
      success = false
    end
    if success
      #success("Build of project #{blue(path)} finished", { :i18n => false })
      network.ignore(path)
    end
    success
  end
end
end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
corl-0.5.11 lib/CORL/builder/project.rb
corl-0.5.10 lib/CORL/builder/project.rb
corl-0.5.9 lib/CORL/builder/project.rb
corl-0.5.8 lib/CORL/builder/project.rb
corl-0.5.7 lib/CORL/builder/project.rb
corl-0.5.6 lib/CORL/builder/project.rb
corl-0.5.5 lib/CORL/builder/project.rb