engine

package
v0.116.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoManifestDetected is the error message returned by Updatecli if it can't find manifest
	ErrNoManifestDetected error = errors.New("no Updatecli manifest detected")
)

Functions

func Clone

func Clone(
	s *scm.ScmHandler,
	channel chan int,
	hashes *[]uint64,
	wg *sync.WaitGroup,
) error

Clone parses a scm configuration then clone the git repository if needed.

func GenerateSchema added in v0.23.0

func GenerateSchema(baseSchemaID, schemaDir string) error

func PrintTitle added in v0.63.0

func PrintTitle(title string)

PrintTitle print a title

Types

type Engine

type Engine struct {
	Pipelines []*pipeline.Pipeline
	Options   Options
	Reports   reports.Reports
	// contains filtered or unexported fields
}

Engine defined parameters for a specific engine run.

func (*Engine) Clean

func (e *Engine) Clean() (err error)

Clean remove every traces from an updatecli run.

func (*Engine) InitSCM

func (e *Engine) InitSCM() (err error)

InitSCM search and clone only once SCM configurations found.

func (*Engine) LoadAutoDiscovery added in v0.31.0

func (e *Engine) LoadAutoDiscovery(ctx context.Context, defaultEnabled bool) error

LoadAutoDiscovery runs autodiscovery under the provided context so that crawler spans can be linked to the calling prepare span.

func (*Engine) LoadConfigurations added in v0.17.0

func (e *Engine) LoadConfigurations() error

ReadConfigurations read every strategies configuration.

func (*Engine) ManifestUpgrade added in v0.27.0

func (e *Engine) ManifestUpgrade(saveToDisk bool) (err error)

ManifestUpgrade load Updatecli Manifest to update them then written them back on disk

func (*Engine) OrderPipelines added in v0.116.2

func (e *Engine) OrderPipelines() error

OrderPipelines resolves manifest-level dependencies and reorders pipelines accordingly.

func (*Engine) Prepare

func (e *Engine) Prepare(ctx context.Context) (err error)

Prepare runs all preparation phases under the provided context, emitting an OTel span for the overall prepare phase and one child span per sub-phase.

func (*Engine) PullFromRegistry added in v0.63.0

func (e *Engine) PullFromRegistry(policyReference string, disableTLS bool) (err error)

PullFromRegistry retrieves an Updatecli policy from an OCI registry.

func (*Engine) PushToRegistry added in v0.63.0

func (e *Engine) PushToRegistry(manifests, valuesFiles, secretsFiles, policyReference []string, disableTLS bool, policyMetadataFile, fileStore string, overwrite bool) error

PushToRegistry pushes an Updatecli policy to an OCI registry.

func (*Engine) Run

func (e *Engine) Run(ctx context.Context) (err error)

Run runs the full process under the provided context, emitting OpenTelemetry spans for each major operation so failures are observable.

func (*Engine) Scaffold added in v0.72.0

func (e *Engine) Scaffold(rootDir string) error

func (*Engine) SetTracer added in v0.116.0

func (e *Engine) SetTracer(t trace.Tracer)

SetTracer configures the tracer used for OTel instrumentation across all engine operations. Call this once after telemetry is initialized, before invoking Prepare or Run.

func (*Engine) Show

func (e *Engine) Show() (err error)

Show displays configurations that should be apply.

type Options

type Options struct {
	// Config holds the application configuration options
	Config config.Option
	// Pipeline holds pipeline execution options
	Pipeline pipeline.Options
	// Manifests holds a list of manifests to process
	Manifests []manifest.Manifest
	// DisplayFlavor defines the flavor of the display output
	DisplayFlavor string
	// GraphFlavor defines the flavor of the dependency graph
	GraphFlavor string
	// PipelineIDs holds a list of pipeline IDs to filter on
	PipelineIDs []string
	// Labels holds a map of labels to filter on
	Labels map[string]string
}

Options defines application specific behaviors

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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