engine

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: MIT Imports: 20 Imported by: 0

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")
)

Functions

func Clone

func Clone(
	SCM *map[string]interface{},
	hashes *[]uint64,
	channel chan int,
	wg *sync.WaitGroup) error

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

func GetFiles

func GetFiles(root string) (files []string)

GetFiles return an array with every valid files.

func RunConditions

func RunConditions(
	config *config.Config,
	pipelineContext *context.Context,
	pipelineReport *reports.Report) (globalResult bool, err error)

RunConditions run every conditions for a given configuration config.

func RunSources

func RunSources(
	conf *config.Config,
	pipelineReport *reports.Report,
	pipelineContext *context.Context) error

RunSources iterates on every source definition to retrieve every information.

func RunTargets

func RunTargets(
	cfg *config.Config,
	options *target.Options,
	pipelineReport *reports.Report,
	pipelineContext *context.Context) error

RunTargets iterates on every target to update each them.

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 Engine

type Engine struct {
	Contexts []context.Context
	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) Prepare

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

Prepare run every actions needed before going further.

func (*Engine) ReadConfigurations

func (e *Engine) ReadConfigurations() error

ReadConfigurations read every strategies configuration.

func (*Engine) Run

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

Run run the full process one yaml file.

func (*Engine) Show

func (e *Engine) Show() error

Show displays configurations that should be apply.

type Options

type Options struct {
	File         string
	ValuesFiles  []string
	SecretsFiles []string
	Target       target.Options
}

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