model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultStepImplementation

type DefaultStepImplementation struct {
	StepType pipeline.StepType

	ErrorMessage   string
	SuccessMessage string
	Error          error
	// contains filtered or unexported fields
}

DefaultStepImplementation Struct to hold the data common to all step implementations

func (*DefaultStepImplementation) ErrorMsg

func (step *DefaultStepImplementation) ErrorMsg(err error) string

ErrorMsg Default implementation

func (*DefaultStepImplementation) GetAppName

func (step *DefaultStepImplementation) GetAppName() string

GetAppName Default implementation

func (*DefaultStepImplementation) GetApplicationConfig

func (step *DefaultStepImplementation) GetApplicationConfig() *v1.RadixApplication

GetApplicationConfig Default implementation

func (*DefaultStepImplementation) GetKubeclient

func (step *DefaultStepImplementation) GetKubeclient() kubernetes.Interface

GetKubeclient Default implementation

func (*DefaultStepImplementation) GetKubeutil

func (step *DefaultStepImplementation) GetKubeutil() *kube.Kube

GetKubeutil Default implementation

func (*DefaultStepImplementation) GetPrometheusOperatorClient

func (step *DefaultStepImplementation) GetPrometheusOperatorClient() monitoring.Interface

GetPrometheusOperatorClient Default implementation

func (*DefaultStepImplementation) GetRadixclient

func (step *DefaultStepImplementation) GetRadixclient() radixclient.Interface

GetRadixclient Default implementation

func (*DefaultStepImplementation) GetRegistration

func (step *DefaultStepImplementation) GetRegistration() *v1.RadixRegistration

GetRegistration Default implementation

func (*DefaultStepImplementation) ImplementationForType

func (step *DefaultStepImplementation) ImplementationForType() pipeline.StepType

ImplementationForType Default implementation

func (*DefaultStepImplementation) Init

func (step *DefaultStepImplementation) Init(
	kubeclient kubernetes.Interface, radixclient radixclient.Interface, kubeutil *kube.Kube, prometheusOperatorClient monitoring.Interface,
	rr *v1.RadixRegistration, ra *v1.RadixApplication)

Init Initialize step

func (*DefaultStepImplementation) Run

func (step *DefaultStepImplementation) Run(pipelineInfo *PipelineInfo) error

Run Default implementation

func (*DefaultStepImplementation) SucceededMsg

func (step *DefaultStepImplementation) SucceededMsg() string

SucceededMsg Default implementation

type PipelineArguments

type PipelineArguments struct {
	PipelineType    string
	JobName         string
	Branch          string
	CommitID        string
	ImageTag        string
	UseCache        string
	PushImage       bool
	DeploymentName  string
	FromEnvironment string
	ToEnvironment   string
}

PipelineArguments Holds arguments for the pipeline

func GetPipelineArgsFromArguments

func GetPipelineArgsFromArguments(args map[string]string) PipelineArguments

GetPipelineArgsFromArguments Gets pipeline arguments from arg string

type PipelineInfo

type PipelineInfo struct {
	Definition         *pipeline.Definition
	TargetEnvironments map[string]bool
	BranchIsMapped     bool
	PipelineArguments  PipelineArguments
	Steps              []Step
}

PipelineInfo Holds info about the pipeline to run

func InitPipeline

func InitPipeline(pipelineType *pipeline.Definition,
	targetEnv map[string]bool,
	branchIsMapped bool,
	pipelineArguments PipelineArguments,
	stepImplementations ...Step) (*PipelineInfo, error)

InitPipeline Initialize pipeline with step implementations

type Step

type Step interface {
	Init(kubernetes.Interface, radixclient.Interface, *kube.Kube, monitoring.Interface, *v1.RadixRegistration, *v1.RadixApplication)

	ImplementationForType() pipeline.StepType
	ErrorMsg(error) string
	SucceededMsg() string
	Run(*PipelineInfo) error

	GetAppName() string
	GetRegistration() *v1.RadixRegistration
	GetApplicationConfig() *v1.RadixApplication
	GetKubeclient() kubernetes.Interface
	GetRadixclient() radixclient.Interface
	GetKubeutil() *kube.Kube
	GetPrometheusOperatorClient() monitoring.Interface
}

Step Generic interface for any Step implementation

Jump to

Keyboard shortcuts

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