25 lines
463 B
Ruby
25 lines
463 B
Ruby
|
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
|