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!
|
|
|
|
create_deployments!
|
|
|
|
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
|