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

remote.rb « content « config « chain « pipeline « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dcc336b89298a8a2cd54f346f91c2cb684d9cb1c (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
# frozen_string_literal: true

module Gitlab
  module Ci
    module Pipeline
      module Chain
        module Config
          class Content
            class Remote < Source
              def content
                strong_memoize(:content) do
                  next unless ci_config_path =~ URI.regexp(%w[http https])

                  YAML.dump('include' => [{ 'remote' => ci_config_path }])
                end
              end

              def source
                :remote_source
              end
            end
          end
        end
      end
    end
  end
end