Class: Gitlab::Ci::Pipeline::Chain::Config::Content::ExternalProject

Inherits:
Source
  • Object
show all
Defined in:
lib/gitlab/ci/pipeline/chain/config/content/external_project.rb

Constant Summary

Constants inherited from Source

Source::DEFAULT_YAML_FILE

Instance Attribute Summary

Attributes inherited from Source

#command

Instance Method Summary collapse

Methods inherited from Source

#ci_config_path, #exists?, #initialize, #project

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Constructor Details

This class inherits a constructor from Gitlab::Ci::Pipeline::Chain::Config::Content::Source

Instance Method Details

#contentObject


10
11
12
13
14
15
16
17
# File 'lib/gitlab/ci/pipeline/chain/config/content/external_project.rb', line 10

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

    path_file, path_project = ci_config_path.split('@', 2)
    YAML.dump('include' => [{ 'project' => path_project, 'file' => path_file }])
  end
end

#sourceObject


19
20
21
# File 'lib/gitlab/ci/pipeline/chain/config/content/external_project.rb', line 19

def source
  :external_project_source
end