Module: Dapp::Dimg::Dimg::Stages

Included in:
Dapp::Dimg::Dimg
Defined in:
lib/dapp/dimg/dimg/stages.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#last_stageObject



25
26
27
28
29
30
31
32
33
# File 'lib/dapp/dimg/dimg/stages.rb', line 25

def last_stage
  @last_stage || begin
    (self.last_stage = last_stage_class.new(self)).tap do |stage|
      dapp.log_secondary_process("#{name || 'nameless'}: calculating stages signatures") do
        stage.signature
      end unless ignore_signature_auto_calculation
    end
  end
end

Instance Method Details

#all_tagged_imagesObject



21
22
23
# File 'lib/dapp/dimg/dimg/stages.rb', line 21

def all_tagged_images
  tagged_images.concat(artifacts.map(&:all_tagged_images).flatten).uniq(&:name)
end

#signatureObject



5
6
7
# File 'lib/dapp/dimg/dimg/stages.rb', line 5

def signature
  last_stage.signature
end

#stage_by_name(name) ⇒ Object



9
10
11
# File 'lib/dapp/dimg/dimg/stages.rb', line 9

def stage_by_name(name)
  stages.find { |s| s.name == name }
end

#stage_cache_formatObject



13
14
15
# File 'lib/dapp/dimg/dimg/stages.rb', line 13

def stage_cache_format
  "#{dapp.stage_cache}:%{signature}"
end

#stage_dapp_labelObject



17
18
19
# File 'lib/dapp/dimg/dimg/stages.rb', line 17

def stage_dapp_label
  dapp.stage_dapp_label
end