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

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

26 lines
543 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 EnsureEnvironments < Chain::Base
def perform!
pipeline.stages.map(&:statuses).flatten.each(&method(:ensure_environment))
end
def break?
false
end
private
def ensure_environment(build)
2023-01-13 00:05:48 +05:30
::Environments::CreateForBuildService.new.execute(build, merge_request: @command.merge_request)
2022-01-26 12:08:38 +05:30
end
end
end
end
end
end