Welcome to mirror list, hosted at ThFree Co, Russian Federation.

build_success_worker.rb « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4b9097bc5e4ed9461a17abcb7a10d2ad674879b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class BuildSuccessWorker
  include ApplicationWorker
  include PipelineQueue

  queue_namespace :pipeline_processing

  def perform(build_id)
    Ci::Build.find_by(id: build_id).try do |build|
      create_deployment(build) if build.has_environment?
    end
  end

  private

  def create_deployment(build)
    CreateDeploymentService.new(build).execute
  end
end