class Buildkite::Builder::Loaders::Extensions

Constants

EXTENSIONS_PATH

Public Instance Methods

load() click to toggle source
# File lib/buildkite/builder/loaders/extensions.rb, line 11
def load
  load_extensions_from_path(global_extensions_path)
  load_extensions_from_path(pipeline_extensions_path)
end

Private Instance Methods

global_extensions_path() click to toggle source
# File lib/buildkite/builder/loaders/extensions.rb, line 27
def global_extensions_path
  buildkite_path.join(EXTENSIONS_PATH)
end
load_extensions_from_path(path) click to toggle source
# File lib/buildkite/builder/loaders/extensions.rb, line 18
def load_extensions_from_path(path)
  return unless path.directory?

  path.children.map do |file|
    required_status = require(file.to_s)
    add(file.basename, { required: required_status })
  end
end
pipeline_extensions_path() click to toggle source
# File lib/buildkite/builder/loaders/extensions.rb, line 31
def pipeline_extensions_path
  root.join(EXTENSIONS_PATH)
end