debian-mirror-gitlab/lib/gitlab/ci/pipeline/chain/create_deployments.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
655 B
Ruby
Raw Normal View History

2022-01-26 12:08:38 +05:30
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
module Chain
class CreateDeployments < Chain::Base
def perform!
2023-03-17 16:20:25 +05:30
create_deployments! if Feature.disabled?(:move_create_deployments_to_worker, pipeline.project)
2022-01-26 12:08:38 +05:30
end
def break?
false
end
private
def create_deployments!
pipeline.stages.map(&:statuses).flatten.map(&method(:create_deployment))
end
def create_deployment(build)
2022-03-02 08:16:31 +05:30
::Deployments::CreateForBuildService.new.execute(build)
2022-01-26 12:08:38 +05:30
end
end
end
end
end
end