processor

package
v0.0.159 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertLegacyStepAnnotationURLToUsesImage

func ConvertLegacyStepAnnotationURLToUsesImage(ann map[string]string, key string) string

ConvertLegacyStepAnnotationURLToUsesImage converts the given append annotation URL to a uses string if its not blank

func FindStep

func FindStep(spec *v1beta1.TaskSpec, name string) *v1beta1.Step

FindStep returns the named step or nil

func ImageWithoutVersionTag

func ImageWithoutVersionTag(image string) string

ImageWithoutVersionTag returns the image string without any version tag.

func NewInliner

func NewInliner(input input.Interface, resolver *inrepo.UsesResolver, defaultSHA, step string, inlineProperties []string) *inliner

NewInliner

func NewModifier added in v0.0.135

func NewModifier(templateEnvs map[string]string) *modifier

NewModifier

func ProcessFile

func ProcessFile(processor Interface, path string) (bool, error)

ProcessFile processes the given file with the processor

func ProcessPipelineSpec

func ProcessPipelineSpec(ps *tektonv1beta1.PipelineSpec, path string, fn func(ts *tektonv1beta1.TaskSpec, path, name string) (bool, error)) (bool, error)

ProcessPipelineSpec default function for processing a pipeline spec which may be nil

Types

type Interface

type Interface interface {
	// ProcessTask processes a Task and returns if its modified and/or error
	ProcessTask(task *tektonv1beta1.Task, path string) (bool, error)

	// ProcessTaskRun processes a TaskRun and returns if its modified and/or error
	ProcessTaskRun(tr *tektonv1beta1.TaskRun, path string) (bool, error)

	// ProcessPipeline processes a Pipeline and returns if its modified and/or error
	ProcessPipeline(pipeline *tektonv1beta1.Pipeline, path string) (bool, error)

	// ProcessPipelineRun processes a PipelineRun and returns if its modified and/or error
	ProcessPipelineRun(prs *tektonv1beta1.PipelineRun, path string) (bool, error)
}

Interface the interface for a pipeline processor

type UsesMigrator

type UsesMigrator struct {
	CatalogTaskSpec *v1beta1.TaskSpec
	Dir             string
	Owner           string
	Repository      string
	TasksFolder     string
	SHA             string
	UseSHA          string
	// contains filtered or unexported fields
}

func NewUsesMigrator

func NewUsesMigrator(dir, tasksFolder, owner, repository, useSHA string, catalog bool) *UsesMigrator

NewUsesMigrator creates a new uses migrator

func (*UsesMigrator) ProcessPipeline

func (p *UsesMigrator) ProcessPipeline(pipeline *v1beta1.Pipeline, path string) (bool, error)

func (*UsesMigrator) ProcessPipelineRun

func (p *UsesMigrator) ProcessPipelineRun(prs *v1beta1.PipelineRun, path string) (bool, error)

func (*UsesMigrator) ProcessTask

func (p *UsesMigrator) ProcessTask(task *v1beta1.Task, path string) (bool, error)

func (*UsesMigrator) ProcessTaskRun

func (p *UsesMigrator) ProcessTaskRun(tr *v1beta1.TaskRun, path string) (bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL