debian-mirror-gitlab/lib/gitlab/ci/build/credentials/factory.rb

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

30 lines
539 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
module Gitlab
module Ci
module Build
module Credentials
class Factory
def initialize(build)
@build = build
end
def create!
credentials.select(&:valid?)
end
private
def credentials
providers.map { |provider| provider.new(@build) }
end
def providers
2021-03-11 19:13:27 +05:30
[Registry::GitlabRegistry, Registry::DependencyProxy]
2017-08-17 22:00:37 +05:30
end
end
end
end
end
end