Documentation
¶
Overview ¶
Package compiler provides the ability for Vela to reconstruct a yaml configuration into an executable pipeline.
Usage:
import "github.com/go-vela/compiler/compiler"
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
type Engine interface {
// Compile defines a function that produces an executable
// representation of a pipeline from an object. This calls
// Parse internally to convert the object to a yaml configuration.
Compile(interface{}) (*pipeline.Build, error)
// Parse defines a function that converts
// an object to a yaml configuration.
Parse(interface{}) (*yaml.Build, error)
// Validate defines a function that verifies
// the yaml configuration is accurate.
Validate(*yaml.Build) error
// CloneStage defines a function that injects the
// clone stage process into a yaml configuration.
CloneStage(*yaml.Build) (*yaml.Build, error)
// CloneStep defines a function that injects the
// clone step process into a yaml configuration.
CloneStep(*yaml.Build) (*yaml.Build, error)
// EnvironmentStages defines a function that injects the environment
// variables for each step in every stage into a yaml configuration.
EnvironmentStages(yaml.StageSlice) (yaml.StageSlice, error)
// EnvironmentSteps defines a function that injects the environment
// variables for each step into a yaml configuration.
EnvironmentSteps(yaml.StepSlice) (yaml.StepSlice, error)
// ExpandStages defines a function that injects the template
// for each templated step in every stage in a yaml configuration.
ExpandStages(yaml.StageSlice, map[string]*yaml.Template) (yaml.StageSlice, error)
// ExpandSteps defines a function that injects the template
// for each templated step in a yaml configuration.
ExpandSteps(yaml.StepSlice, map[string]*yaml.Template) (yaml.StepSlice, error)
// InitStage defines a function that injects the
// init stage process into a yaml configuration.
InitStage(*yaml.Build) (*yaml.Build, error)
// CloneStep defines a function that injects the
// init step process into a yaml configuration.
InitStep(*yaml.Build) (*yaml.Build, error)
// ScriptStages defines a function that injects the script
// for each step in every stage in a yaml configuration.
ScriptStages(yaml.StageSlice) (yaml.StageSlice, error)
// ScriptSteps defines a function that injects the script
// for each step in a yaml configuration.
ScriptSteps(yaml.StepSlice) (yaml.StepSlice, error)
// TransformStages defines a function that converts a yaml
// configuration with stages into an executable pipeline.
TransformStages(*pipeline.RuleData, *yaml.Build) (*pipeline.Build, error)
// TransformSteps defines a function that converts a yaml
// configuration with steps into an executable pipeline.
TransformSteps(*pipeline.RuleData, *yaml.Build) (*pipeline.Build, error)
// WithBuild defines a function that sets
// the library build type in the Engine.
WithBuild(*library.Build) Engine
// WithFiles defines a function that sets
// the changeset files in the Engine.
WithFiles([]string) Engine
// WithMetadata defines a function that sets
// the compiler Metadata type in the Engine.
WithMetadata(*types.Metadata) Engine
// WithRepo defines a function that sets
// the library repo type in the Engine.
WithRepo(*library.Repo) Engine
// WithUser defines a function that sets
// the library user type in the Engine.
WithUser(*library.User) Engine
}
Engine represents an interface for converting a yaml configuration to an executable pipeline for Vela.
func FromContext ¶
FromContext returns the compiler Engine associated with this context.
Click to show internal directories.
Click to hide internal directories.