processor

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAllowFailure = errors.New("ignore error returned from step")
View Source
var ErrConditionFalse = errors.New("conditional step skipped")
View Source
var ErrEmptyMatrix = errors.New("empty matrix")
View Source
var ErrSkipBlacklist = errors.New("skip blacklisted step")
View Source
var ErrSkipDone = errors.New("skip step marked as successful")
View Source
var ErrTimeout = errors.New("operation timed out")

Functions

func AbortOnError

func AbortOnError(err error) bool

func ContainerSpec added in v0.0.29

func ContainerSpec(container *runtime.ContainerSpec, template *v1beta1.Template)

func SuffixName added in v0.0.29

func SuffixName(name, suffix string) string

Types

type AllowFailure

type AllowFailure struct {
}

func (*AllowFailure) Bootstrap

func (s *AllowFailure) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type And

type And struct {
	// contains filtered or unexported fields
}

func (*And) Bootstrap

func (s *And) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Bootstraper

type Bootstraper interface {
	Bootstrap(pipeline Pipeline, next Next) (Next, error)
}

func Builder

func Builder(spec *v1beta1.Step, builders ...ProcessorBuilder) []Bootstraper

func WithDebug added in v0.0.29

func WithDebug(logger logr.Logger, debug bool, spec *v1beta1.Step, processors ...Bootstraper) []Bootstraper

type Concurrent

type Concurrent struct {
	// contains filtered or unexported fields
}

func (*Concurrent) Bootstrap

func (s *Concurrent) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Debug added in v0.0.29

type Debug struct {
	// contains filtered or unexported fields
}

func (*Debug) Bootstrap added in v0.0.29

func (s *Debug) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type EnvVars added in v0.0.26

type EnvVars struct {
	// contains filtered or unexported fields
}

func (*EnvVars) Bootstrap added in v0.0.26

func (s *EnvVars) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Executable

type Executable func() (StepContext, map[string]v1beta1.ParamValue, error)

type GarbageCollector

type GarbageCollector struct {
	// contains filtered or unexported fields
}

func (*GarbageCollector) Bootstrap

func (s *GarbageCollector) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type If

type If struct {
	// contains filtered or unexported fields
}

func (*If) Bootstrap

func (s *If) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Inherit

type Inherit struct {
	// contains filtered or unexported fields
}

func (*Inherit) Bootstrap

func (s *Inherit) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type InputVars added in v0.0.26

type InputVars struct {
	// contains filtered or unexported fields
}

func (*InputVars) Bootstrap added in v0.0.26

func (s *InputVars) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type LogBuilder added in v0.0.31

type LogBuilder func(w io.Writer) (logr.Logger, error)

type Logger added in v0.0.19

type Logger struct {
	// contains filtered or unexported fields
}

func (*Logger) Bootstrap added in v0.0.19

func (s *Logger) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Matrix

type Matrix struct {
	// contains filtered or unexported fields
}

func (*Matrix) Bootstrap

func (s *Matrix) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Monitor added in v0.0.31

type Monitor struct {
	// contains filtered or unexported fields
}

func (*Monitor) Bootstrap added in v0.0.31

func (s *Monitor) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Needs

type Needs struct {
	// contains filtered or unexported fields
}

func (*Needs) Bootstrap

func (s *Needs) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Next

type Next func(ctx StepContext) (StepContext, error)

func Chain

func Chain(pipeline Pipeline, s ...Bootstraper) (Next, error)

type OtelMetrics added in v0.0.7

type OtelMetrics struct {
	// contains filtered or unexported fields
}

func (*OtelMetrics) Bootstrap added in v0.0.7

func (s *OtelMetrics) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type OtelTrace added in v0.0.7

type OtelTrace struct {
	// contains filtered or unexported fields
}

func (*OtelTrace) Bootstrap added in v0.0.7

func (s *OtelTrace) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Output added in v0.0.19

type Output struct {
	// contains filtered or unexported fields
}

func (*Output) Bootstrap added in v0.0.19

func (s *Output) Bootstrap(pipelineCtx Pipeline, next Next) (Next, error)

type OutputCloser

type OutputCloser func(err error) error

type OutputFactory

type OutputFactory func(ctx StepContext, stepName, short string) (io.Writer, io.Writer, OutputCloser)

type OutputParam added in v0.0.19

type OutputParam struct {
	Name string
	Path string
}

type OutputVars added in v0.0.26

type OutputVars struct {
	// contains filtered or unexported fields
}

func (*OutputVars) Bootstrap added in v0.0.26

func (s *OutputVars) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Pipe

type Pipe struct {
	// contains filtered or unexported fields
}

func (*Pipe) Bootstrap

func (s *Pipe) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Pipeline

type Pipeline interface {
	Step(name string) (Step, error)
	Entrypoint(name string) (Next, error)
	EntrypointName() (string, error)
	Name() string
	ID() string
}

type PipelineBuilder

type PipelineBuilder interface {
	Build(pipeline v1beta1.Pipeline, entrypoint string, inputs map[string]v1beta1.ParamValue, stepCtx StepContext) (Executable, error)
}

type ProcessorBuilder

type ProcessorBuilder func(spec *v1beta1.Step) Bootstraper

func WithAllowFailure

func WithAllowFailure() ProcessorBuilder

func WithAnd

func WithAnd() ProcessorBuilder

func WithConcurrent

func WithConcurrent(pool pond.Pool) ProcessorBuilder

func WithEnvVars added in v0.0.26

func WithEnvVars(osEnv, defaultEnv map[string]string) ProcessorBuilder

func WithGarbageCollector

func WithGarbageCollector(noGC bool, driver runtime.Interface, teardown chan Teardown) ProcessorBuilder

func WithIf

func WithIf(celEnv *cel.Env) ProcessorBuilder

func WithInherit

func WithInherit(builder PipelineBuilder, provider provider.Interface) ProcessorBuilder

func WithInputVars added in v0.0.26

func WithInputVars(celEnv *cel.Env) ProcessorBuilder

func WithLogger added in v0.0.19

func WithLogger(defaultLogger logr.Logger, logBuilder LogBuilder, detached bool) ProcessorBuilder

func WithMatrix

func WithMatrix(pool pond.Pool) ProcessorBuilder

func WithMonitor added in v0.0.31

func WithMonitor(enabled bool, interval time.Duration, dev io.Writer) ProcessorBuilder

func WithNeeds

func WithNeeds() ProcessorBuilder

func WithOtelMetrics added in v0.0.7

func WithOtelMetrics(meter metric.Meter) ProcessorBuilder

func WithOtelTrace added in v0.0.7

func WithOtelTrace(logger logr.Logger, tracer trace.Tracer) ProcessorBuilder

func WithOutput added in v0.0.19

func WithOutput(outputFactory OutputFactory, withInternals, decouple bool) ProcessorBuilder

func WithOutputVars added in v0.0.26

func WithOutputVars() ProcessorBuilder

func WithPipe

func WithPipe(tee bool) ProcessorBuilder

func WithRecover added in v0.0.19

func WithRecover() ProcessorBuilder

func WithReport

func WithReport(report Reporter) ProcessorBuilder

func WithResult added in v0.0.7

func WithResult() ProcessorBuilder

func WithRetry

func WithRetry() ProcessorBuilder

func WithRun

func WithRun(defaultPullPolicy runtime.PullImagePolicy, driver runtime.Interface, outputFactory OutputFactory, teardown chan Teardown) ProcessorBuilder

func WithSecretVars added in v0.0.29

func WithSecretVars(osEnv, defaultSecret map[string]string, secretWriter secretWriter) ProcessorBuilder

func WithSkipBlacklist added in v0.0.7

func WithSkipBlacklist(blacklist []string) ProcessorBuilder

func WithSkipDone

func WithSkipDone(skipDone bool) ProcessorBuilder

func WithStdioRedirect added in v0.0.19

func WithStdioRedirect(tee bool) ProcessorBuilder

func WithTags added in v0.0.36

func WithTags(globalTags []Tag) ProcessorBuilder

func WithTemplate added in v0.0.19

func WithTemplate(template v1beta1.Template) ProcessorBuilder

func WithTimeout

func WithTimeout() ProcessorBuilder

func WithTmpDir added in v0.0.9

func WithTmpDir() ProcessorBuilder

type Recover added in v0.0.19

type Recover struct {
	// contains filtered or unexported fields
}

func (*Recover) Bootstrap added in v0.0.19

func (s *Recover) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Report

type Report struct {
	// contains filtered or unexported fields
}

func (*Report) Bootstrap

func (s *Report) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Reporter added in v0.0.29

type Reporter interface {
	Report(ctx StepContext, name string) error
}

type Result added in v0.0.7

type Result struct {
	// contains filtered or unexported fields
}

func (*Result) Bootstrap added in v0.0.7

func (s *Result) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Retry

type Retry struct {
	// contains filtered or unexported fields
}

func (*Retry) Bootstrap

func (s *Retry) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Run

type Run struct {
	// contains filtered or unexported fields
}

func (*Run) Bootstrap

func (s *Run) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type SecretVars added in v0.0.29

type SecretVars struct {
	// contains filtered or unexported fields
}

func (*SecretVars) Bootstrap added in v0.0.29

func (s *SecretVars) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type SkipBlacklist added in v0.0.7

type SkipBlacklist struct {
	// contains filtered or unexported fields
}

func (*SkipBlacklist) Bootstrap added in v0.0.7

func (s *SkipBlacklist) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type SkipDone

type SkipDone struct {
	// contains filtered or unexported fields
}

func (*SkipDone) Bootstrap

func (s *SkipDone) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type StdioRedirect added in v0.0.19

type StdioRedirect struct {
	// contains filtered or unexported fields
}

func (*StdioRedirect) Bootstrap added in v0.0.19

func (s *StdioRedirect) Bootstrap(pipelineCtx Pipeline, next Next) (Next, error)

type Step

type Step interface {
	Processors() []Bootstraper
	Entrypoint() (Next, error)
}

type StepContext

type StepContext struct {
	context.Context `json:"-"`
	Dir             string
	DataDir         string
	Matrix          map[string]string
	Inputs          map[string]v1beta1.ParamValue
	Steps           map[string]*StepContext `json:"-"`
	Envs            map[string]string
	Secrets         map[string]string
	Containers      map[string]cruntime.ContainerStatus

	NamePrefix       string
	Secret           string
	Env              string
	Outputs          []OutputParam
	Stdin            io.Reader
	Stdout           io.Writer
	Stderr           io.Writer
	AdditionalStdout []io.Writer
	AdditionalStderr []io.Writer
	Template         *v1beta1.Template
	StartedAt        time.Time
	EndedAt          time.Time
	OutputVars       map[string]v1beta1.ParamValue
	Error            error
	// contains filtered or unexported fields
}

func NewContext

func NewContext() StepContext

func (StepContext) DeepCopy

func (c StepContext) DeepCopy() StepContext

func (StepContext) FromV1Beta1

func (t StepContext) FromV1Beta1(vars *v1beta1.Context)

func (StepContext) HasTag added in v0.0.29

func (t StepContext) HasTag(key string) bool

func (StepContext) Merge

func (t StepContext) Merge(c StepContext) StepContext

func (StepContext) Tags added in v0.0.19

func (t StepContext) Tags() []Tag

func (StepContext) ToV1Beta1

func (t StepContext) ToV1Beta1() *v1beta1.Context

func (StepContext) WithTag added in v0.0.29

func (t StepContext) WithTag(tag Tag) StepContext

type Tag added in v0.0.28

type Tag struct {
	Key   string
	Value string
	Color string
}

type Tags added in v0.0.36

type Tags struct {
	// contains filtered or unexported fields
}

func (*Tags) Bootstrap added in v0.0.36

func (s *Tags) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Teardown

type Teardown func(ctx context.Context, timeout time.Duration) error

type Template added in v0.0.19

type Template struct {
	// contains filtered or unexported fields
}

func (*Template) Bootstrap added in v0.0.19

func (s *Template) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Timeout

type Timeout struct {
	// contains filtered or unexported fields
}

func (*Timeout) Bootstrap

func (s *Timeout) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type TmpDir added in v0.0.9

type TmpDir struct {
	// contains filtered or unexported fields
}

func (*TmpDir) Bootstrap added in v0.0.9

func (s *TmpDir) Bootstrap(pipeline Pipeline, next Next) (Next, error)

Jump to

Keyboard shortcuts

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