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

28 lines
465 B
Ruby
Raw Normal View History

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
[Registry]
end
end
end
end
end
end