Class: InchCI::Worker::Project::BuildTags::HandleWorkerOutput

Inherits:
Object
  • Object
show all
Defined in:
lib/inch_ci/worker/project/build_tags.rb

Instance Method Summary collapse

Constructor Details

#initialize(url, branch_name, output) ⇒ HandleWorkerOutput


37
38
39
40
41
42
43
44
45
46
# File 'lib/inch_ci/worker/project/build_tags.rb', line 37

def initialize(url, branch_name, output)
  data = YAML.load(output)
  if data && tags = data['tags']
    tags.each do |tag|
      Build.enqueue(url, branch_name, tag, 'tag_build')
    end
  else
    raise "Running worker ".color(:red) + url.color(:cyan) +  " failed:".color(:red) + " #{output.inspect}"
  end
end