pipeline

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotValidDependsOn is triggered when we define a non existing depends on value.
	ErrNotValidDependsOn = errors.New("no valid depends_on value")
	// ErrDependsOnLoopDetected is triggered when we define a dependency loop.
	ErrDependsOnLoopDetected = errors.New("dependency loop detected")
)
View Source
var (
	// ErrRunTargets is return when at least one error happened during targets execution
	ErrRunTargets error = errors.New("something went wrong during target execution")
)

Functions

func SortedConditionsKeys

func SortedConditionsKeys(conditions *map[string]condition.Condition) (result []string, err error)

SortedConditionsKeys return a a list of resources by building a DAG

func SortedSourcesKeys

func SortedSourcesKeys(sources *map[string]source.Source) (result []string, err error)

SortedSourcesKeys return a a list of resources by building a DAG

func SortedTargetsKeys

func SortedTargetsKeys(targets *map[string]target.Target) (result []string, err error)

SortedTargetsKeys return a a list of resources by building a DAG

Types

type Options added in v0.11.0

type Options struct {
	Target target.Options
}

type Pipeline

type Pipeline struct {
	Name  string // Name defines a pipeline name, used to improve human visualization
	ID    string // ID allows to identify a full pipeline run, this value is propagated into each target if not defined at that level
	Title string // Title is used for the full pipeline

	Sources    map[string]source.Source
	Conditions map[string]condition.Condition
	Targets    map[string]target.Target
	SCMs       map[string]scm.Scm
	Actions    map[string]action.Action

	Report reports.Report

	Options Options

	Config *config.Config
}

Pipeline represent an updatecli run for a specific configuration

func (*Pipeline) GetTargetsIDByResult added in v0.17.0

func (p *Pipeline) GetTargetsIDByResult(targetIDs []string) (
	failedTargetsID, attentionTargetsID, successTargetsID, skippedTargetsID []string)

GetTargetsIDByResult return a list of target ID per result type

func (*Pipeline) Init

func (p *Pipeline) Init(config *config.Config, options Options) error

Init initialize an updatecli context based on its configuration

func (*Pipeline) Run added in v0.11.0

func (p *Pipeline) Run() error

Run execute an single pipeline

func (*Pipeline) RunActions added in v0.40.0

func (p *Pipeline) RunActions() error

func (*Pipeline) RunConditions

func (p *Pipeline) RunConditions() (globalResult bool, err error)

RunConditions run every conditions for a given configuration config.

func (*Pipeline) RunSources

func (p *Pipeline) RunSources() error

RunSources iterates on every source definition to retrieve every information.

func (*Pipeline) RunTargets

func (p *Pipeline) RunTargets() error

RunTargets iterates on every target to update each of them.

func (*Pipeline) SearchAssociatedTargetsID added in v0.31.0

func (p *Pipeline) SearchAssociatedTargetsID(actionID string) ([]string, error)

SearchAssociatedTargetsID search for targets related to an action based on a scm configuration

func (*Pipeline) String

func (p *Pipeline) String() string

func (*Pipeline) Update added in v0.44.0

func (p *Pipeline) Update() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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