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