engine

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package engine orchestrates a Tekton PipelineRun. It builds the DAG, resolves params and results, evaluates when-expressions, runs `finally` tasks, and drives a Backend. Pure of I/O except via the Backend and the Reporter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetResultsDirProvisioner

func SetResultsDirProvisioner(fn func(parent, taskName string) (string, error))

SetResultsDirProvisioner is called once by the CLI to wire the engine's per-task results dir creation into a workspace.Manager. Tests don't need this — the unit test fake backend ignores the empty path.

Types

type Engine

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

func New

func New(be backend.Backend, rep reporter.Reporter, opts Options) *Engine

func (*Engine) RunPipeline

func (e *Engine) RunPipeline(ctx context.Context, in PipelineInput) (RunResult, error)

type Options

type Options struct {
	MaxParallel int
}

type PipelineInput

type PipelineInput struct {
	Bundle     *loader.Bundle
	Name       string                            // pipeline name
	Params     map[string]tektontypes.ParamValue // user-provided params
	Workspaces map[string]string                 // pipeline workspace name → host path
	RunID      string                            // optional; auto-generated if empty
}

PipelineInput names what to run and how.

type RunResult

type RunResult struct {
	Status string // succeeded | failed
	Tasks  map[string]TaskOutcome
}

RunResult is the outcome of a pipeline run.

type TaskOutcome

type TaskOutcome struct {
	Status  string
	Message string
	Results map[string]string
}

Directories

Path Synopsis
Package dag implements a small directed acyclic graph: build, topological level grouping, cycle detection, descendant traversal.
Package dag implements a small directed acyclic graph: build, topological level grouping, cycle detection, descendant traversal.

Jump to

Keyboard shortcuts

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