debian-mirror-gitlab/lib/gitlab/ci/build/credentials/factory.rb
2018-12-13 13:39:08 +05:30

29 lines
496 B
Ruby

# frozen_string_literal: true
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