Module: Buildkite::Builder

Defined in:
lib/buildkite/builder.rb,
lib/buildkite/builder/dsl.rb,
lib/buildkite/builder/data.rb,
lib/buildkite/builder/plugin.rb,
lib/buildkite/builder/loaders.rb,
lib/buildkite/builder/rainbow.rb,
lib/buildkite/builder/commands.rb,
lib/buildkite/builder/pipeline.rb,
lib/buildkite/builder/extension.rb,
lib/buildkite/builder/definition.rb,
lib/buildkite/builder/extensions.rb,
lib/buildkite/builder/commands/run.rb,
lib/buildkite/builder/logging_utils.rb,
lib/buildkite/builder/extensions/env.rb,
lib/buildkite/builder/extensions/lib.rb,
lib/buildkite/builder/extensions/use.rb,
lib/buildkite/builder/plugin_manager.rb,
lib/buildkite/builder/step_collection.rb,
lib/buildkite/builder/commands/preview.rb,
lib/buildkite/builder/extensions/steps.rb,
lib/buildkite/builder/loaders/abstract.rb,
lib/buildkite/builder/template_manager.rb,
lib/buildkite/builder/commands/abstract.rb,
lib/buildkite/builder/extension_manager.rb,
lib/buildkite/builder/extensions/agents.rb,
lib/buildkite/builder/extensions/notify.rb,
lib/buildkite/builder/loaders/templates.rb,
lib/buildkite/builder/extensions/plugins.rb,
lib/buildkite/builder/loaders/extensions.rb

Defined Under Namespace

Modules: Commands, Definition, Extensions, Loaders, LoggingUtils Classes: Data, Dsl, Extension, ExtensionManager, Pipeline, Plugin, PluginManager, StepCollection, TemplateManager

Constant Summary collapse

BUILDKITE_DIRECTORY_NAME =
Pathname.new('.buildkite').freeze
Rainbow =
::Rainbow

Class Method Summary collapse

Class Method Details

.meta_dataObject



28
29
30
31
32
# File 'lib/buildkite/builder.rb', line 28

def 
  @meta_data ||= {
    job: "buildkite-builder:#{Buildkite.env.step_id}"
  }
end

.pipeline(&block) ⇒ Object



47
48
49
# File 'lib/buildkite/builder.rb', line 47

def pipeline(&block)
  Definition::Pipeline.new(&block) if block_given?
end

.root(start_path: Dir.pwd, reset: false) ⇒ Object



34
35
36
37
# File 'lib/buildkite/builder.rb', line 34

def root(start_path: Dir.pwd, reset: false)
  @root = nil if reset
  @root ||= find_buildkite_directory(start_path)
end

.template(&block) ⇒ Object



43
44
45
# File 'lib/buildkite/builder.rb', line 43

def template(&block)
  Definition::Template.new(&block) if block_given?
end

.versionObject



39
40
41
# File 'lib/buildkite/builder.rb', line 39

def version
  @version ||= File.read(File.expand_path('../../VERSION', __dir__)).strip
end