Class: Gitlab::Ci::Config::External::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/ci/config/external/processor.rb

Constant Summary collapse

IncludeError =
Class.new(StandardError)

Instance Method Summary collapse

Constructor Details

#initialize(values, context) ⇒ Processor

Returns a new instance of Processor.


10
11
12
13
14
15
16
17
# File 'lib/gitlab/ci/config/external/processor.rb', line 10

def initialize(values, context)
  @values = values
  @external_files = External::Mapper.new(values, context).process
  @content = {}
rescue External::Mapper::Error,
       OpenSSL::SSL::SSLError => e
  raise IncludeError, e.message
end

Instance Method Details

#performObject


19
20
21
22
23
24
25
26
# File 'lib/gitlab/ci/config/external/processor.rb', line 19

def perform
  return @values if @external_files.empty?

  validate_external_files!
  merge_external_files!
  append_inline_content!
  remove_include_keyword!
end