gitlab-org--gitlab-foss/app/workers/build_coverage_worker.rb
Z.J. van de Weg 23fbbe0c92 Return nil as coverage instead of a File object
Given a valid pipeline job, and a regex which wouldn't match to a jobs
trace, the stream of the trace would return the File object. This was
not the case when it matched a value, as that would have been return
from the block.

Now the `extract_coverage` method returns `nil` if no match was found.
2017-04-12 12:03:39 +02:00

8 lines
161 B
Ruby

class BuildCoverageWorker
include Sidekiq::Worker
include BuildQueue
def perform(build_id)
Ci::Build.find_by(id: build_id)&.update_coverage
end
end