planner

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package planner provides a piped component that decides the deployment pipeline of a deployment. The planner bases on the changes from git commits then builds the deployment manifests to know the behavior of the deployment. From that behavior the planner can decides which pipeline should be applied.

Index

Constants

View Source
const (
	PredefinedStageK8sSync       = "K8sSync"
	PredefinedStageTerraformSync = "TerraformSync"
	PredefinedStageCloudRunSync  = "CloudRunSync"
	PredefinedStageLambdaSync    = "LambdaSync"
	PredefinedStageRollback      = "Rollback"
)

Variables

This section is empty.

Functions

func GetPredefinedStage

func GetPredefinedStage(id string) (config.PipelineStage, bool)

GetPredefinedStage finds and returns the predefined stage for the given id.

func MakeInitialStageMetadata

func MakeInitialStageMetadata(cfg config.PipelineStage) map[string]string

MakeInitialStageMetadata makes the initial metadata for the given state configuration.

Types

type Input

type Input struct {
	// Readonly deployment model.
	Deployment                     *model.Deployment
	MostRecentSuccessfulCommitHash string
	TargetDSP                      deploysource.Provider
	RunningDSP                     deploysource.Provider
	AppManifestsCache              cache.Cache
	RegexPool                      *regexpool.Pool
	Logger                         *zap.Logger
}

type Output

type Output struct {
	Version string
	Stages  []*model.PipelineStage
	Summary string
}

type Planner

type Planner interface {
	Plan(ctx context.Context, in Input) (Output, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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