summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/project_config/remote.rb
blob: 17d5a9ee68fd9618c5dd74c7d053a8f72cd2d67c (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
# frozen_string_literal: true

module Gitlab
  module Ci
    class ProjectConfig
      class Remote < Source
        def content
          strong_memoize(:content) do
            next unless ci_config_path =~ URI::DEFAULT_PARSER.make_regexp(%w[http https])

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

        def contains_internal_include?
          true
        end

        def source
          :remote_source
        end
      end
    end
  end
end