module Buildkite::Builder
Constants
- BUILDKITE_DIRECTORY_NAME
- Rainbow
Public Class Methods
pipeline(&block)
click to toggle source
# File lib/buildkite/builder.rb, line 41 def pipeline(&block) Definition::Pipeline.new(&block) if block_given? end
root(start_path: Dir.pwd, reset: false)
click to toggle source
# File lib/buildkite/builder.rb, line 32 def root(start_path: Dir.pwd, reset: false) @root = nil if reset @root ||= find_buildkite_directory(start_path) end
template(&block)
click to toggle source
# File lib/buildkite/builder.rb, line 37 def template(&block) Definition::Template.new(&block) if block_given? end
Private Class Methods
find_buildkite_directory(start_path)
click to toggle source
# File lib/buildkite/builder.rb, line 47 def find_buildkite_directory(start_path) path = Pathname.new(start_path) until path.join(BUILDKITE_DIRECTORY_NAME).directory? raise "Unable to find #{BUILDKITE_DIRECTORY_NAME} from #{start_path}" if path == path.parent path = path.parent end path.expand_path end