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

25 lines
463 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
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