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

26 lines
494 B
Ruby

# frozen_string_literal: true
module Gitlab
module Ci
module Build
module Credentials
class Registry < Base
attr_reader :username, :password
def initialize(build)
@username = 'gitlab-ci-token'
@password = build.token
end
def url
Gitlab.config.registry.host_port
end
def valid?
Gitlab.config.registry.enabled
end
end
end
end
end
end