Class: InchCI::Worker::Project::BuildTags::ShellInvocation

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

Overview

The ShellInvocation class spawns another shell in which the given repo is analysed. The executed script then returns a YAML formatted string which contains the list of tags.

Note: A new shell is spawned so that the resulting process has its

own cwd and Dir.chdir has not to be synchronized across worker
threads.

Constant Summary collapse

BIN =
"bundle exec inch_ci-worker list-tags"

Instance Method Summary collapse

Instance Method Details

#perform(url, branch_name = "master") ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


30
31
32
33
# File 'lib/inch_ci/worker/project/build_tags.rb', line 30

def perform(url, branch_name = "master")
  output = `#{BIN} #{url.inspect} #{branch_name}`
  HandleWorkerOutput.new(url, branch_name, output)
end