planner

package
v0.40.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 9 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"
	PredefinedStageECSSync       = "ECSSync"
	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 {
	ApplicationID                  string
	ApplicationName                string
	GitPath                        model.ApplicationGitPath
	Trigger                        model.DeploymentTrigger
	MostRecentSuccessfulCommitHash string
	PipedConfig                    *config.PipedSpec
	TargetDSP                      deploysource.Provider
	RunningDSP                     deploysource.Provider
	AppManifestsCache              cache.Cache
	RegexPool                      *regexpool.Pool
	GitClient                      gitClient
	Logger                         *zap.Logger
}

type Output

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

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