Class: Pipely::Deploy::Bootstrap

Inherits:
Object
  • Object
show all
Defined in:
lib/pipely/deploy/bootstrap.rb

Overview

Helps bootstrap a pipeline

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gem_files, s3_steps_path) ⇒ Bootstrap



15
16
17
18
# File 'lib/pipely/deploy/bootstrap.rb', line 15

def initialize(gem_files, s3_steps_path)
  @gem_files = gem_files
  @s3_steps_path = s3_steps_path
end

Instance Attribute Details

#gem_filesObject (readonly)

Returns the value of attribute gem_files.



13
14
15
# File 'lib/pipely/deploy/bootstrap.rb', line 13

def gem_files
  @gem_files
end

#s3_steps_pathObject (readonly)

Returns the value of attribute s3_steps_path.



13
14
15
# File 'lib/pipely/deploy/bootstrap.rb', line 13

def s3_steps_path
  @s3_steps_path
end

Instance Method Details

#context(*mixins) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/pipely/deploy/bootstrap.rb', line 20

def context(*mixins)
  bootstrap_mixins = BootstrapRegistry.instance.register_mixins(mixins)

  BootstrapContext.class_eval do
    bootstrap_mixins.each do |mixin|
      puts "Adding bootstrap mixin #{mixin}"
      include mixin.constantize
    end
    self
  end.new.tap do |context|
    context.gem_files = gem_files
    context.s3_steps_path = s3_steps_path
  end
end