diff options
author | Tiger <twatson@gitlab.com> | 2019-03-04 10:56:20 +1100 |
---|---|---|
committer | Tiger <twatson@gitlab.com> | 2019-03-20 12:04:40 +1100 |
commit | 00f0d356b71fa87f8190810b01add0cc4586e90a (patch) | |
tree | e6b59c822bba6db3ea1e80079e644d010b84f806 /app/workers/ci | |
parent | 42ca9c6f0de34dfa7ae09cc0e9672ea5857afd38 (diff) | |
download | gitlab-ce-00f0d356b71fa87f8190810b01add0cc4586e90a.tar.gz |
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.
Diffstat (limited to 'app/workers/ci')
-rw-r--r-- | app/workers/ci/build_prepare_worker.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/workers/ci/build_prepare_worker.rb b/app/workers/ci/build_prepare_worker.rb new file mode 100644 index 00000000000..1a35a74ae53 --- /dev/null +++ b/app/workers/ci/build_prepare_worker.rb @@ -0,0 +1,16 @@ +# 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 |