blob: 5bd30e677e9207b12c990bb1ceb2401168b6a5fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# frozen_string_literal: true
module Gitlab
module Ci
module Build
module Credentials
module Registry
class GitlabRegistry < Credentials::Base
attr_reader :username, :password
def initialize(build)
@username = Gitlab::Auth::CI_JOB_USER
@password = build.token
end
def url
Gitlab.config.registry.host_port
end
def valid?
Gitlab.config.registry.enabled
end
def type
'registry'
end
end
end
end
end
end
end
|