Welcome to mirror list, hosted at ThFree Co, Russian Federation.

registry.rb « credentials « build « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1c8588d9913220f735f3ef951ba9a1791efffb25 (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
# 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