gitlab-org--gitlab-foss/app/workers/ci/build_prepare_worker.rb
Tiger 00f0d356b7 Create framework for build prerequisites
Introduces the concept of Prerequisites for a CI build.
If a build has unmet prerequisites it will go through the
:preparing state before being made available to a runner.

There are no actual prerequisites yet, so current
behaviour is unchanged.
2019-03-20 12:04:40 +11:00

16 lines
324 B
Ruby

# frozen_string_literal: true
module Ci
class BuildPrepareWorker
include ApplicationWorker
include PipelineQueue
queue_namespace :pipeline_processing
def perform(build_id)
Ci::Build.find_by_id(build_id).try do |build|
Ci::PrepareBuildService.new(build).execute
end
end
end
end