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

Inherits:
Source
  • Object
show all
Defined in:
lib/gitlab/ci/pipeline/chain/config/content/repository.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
# File 'lib/gitlab/ci/pipeline/chain/config/content/repository.rb', line 10

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

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

#sourceObject


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

def source
  :repository_source
end