Class: Gitlab::Ci::ProjectConfig::ExternalProject

Inherits:
Source
  • Object
show all
Defined in:
lib/gitlab/ci/project_config/external_project.rb

Instance Method Summary collapse

Methods inherited from Source

#exists?, #initialize, #url

Constructor Details

This class inherits a constructor from Gitlab::Ci::ProjectConfig::Source

Instance Method Details

#contentObject



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/gitlab/ci/project_config/external_project.rb', line 7

def content
  strong_memoize(:content) do
    next unless external_project_path?

    path_file, path_project, ref = extract_location_tokens

    config_location = { 'project' => path_project, 'file' => path_file }
    config_location['ref'] = ref if ref.present?

    YAML.dump('include' => [config_location])
  end
end

#internal_include_prepended?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/gitlab/ci/project_config/external_project.rb', line 20

def internal_include_prepended?
  true
end

#sourceObject



24
25
26
# File 'lib/gitlab/ci/project_config/external_project.rb', line 24

def source
  :external_project_source
end