Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrNonYAMLFileEncountered = errors.New("non-yaml file found in directory")
)
Errors returned from this package
var TemplateVars = newTemplateVars()
TemplateVars represents the vars that are available in all templates
Functions ¶
func PrepareVars ¶
func PrepareVars(files PipelineYAMLDocs) error
PrepareVars adds contextual vars to the templater
Types ¶
type PatchKindYAMLDocs ¶
PatchKindYAMLDocs stores all of the jsonpatch yaml docs found by type
func LoadPatchYAMLFiles ¶
func LoadPatchYAMLFiles(sourcePath string) (PatchKindYAMLDocs, error)
LoadPatchYAMLFiles returns the yaml docs by kind from a given directory
type PipelineParam ¶
PipelineParam represents a Parameter in a Pipeline
type PipelineTask ¶
PipelineTask represents a Task in a Pipeline
type PipelineYAMLDocs ¶
type PipelineYAMLDocs map[string]ResourceDocs
PipelineYAMLDocs stores all of the yaml docs found in a file in the format map[path][]doc
func ExecuteFiles ¶
func ExecuteFiles(files PipelineYAMLDocs) (PipelineYAMLDocs, error)
ExecuteFiles executes the templates
func LoadPipelineYAMLFiles ¶
func LoadPipelineYAMLFiles(sourcePath string) (PipelineYAMLDocs, error)
LoadPipelineYAMLFiles returns all of the PipelineYAMLDocs in a directory
type ResourceDocs ¶
type ResourceDocs []ResourceDoc
ResourceDocs represents a set of K8s resource documents
func GeneratePipelineResourceDocs ¶
func GeneratePipelineResourceDocs() (ResourceDocs, error)
GeneratePipelineResourceDocs returns the set of unique resource docs for a pipeline
type TypeYAMLDocs ¶
TypeYAMLDocs represents a list of resource docs per type in yaml format
func PatchFileYAMLs ¶
func PatchFileYAMLs( files PipelineYAMLDocs, patches PatchKindYAMLDocs, ) (TypeYAMLDocs, error)
PatchFileYAMLs applies the given patches to files