utils

package
v2.0.12-rc4+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PipelineNamespace = "cattle-pipeline"
	DefaultRegistry   = "index.docker.io"
	DefaultTag        = "latest"

	StepTypeSourceCode   = "sourceCode"
	StepTypeRunScript    = "runScript"
	StepTypePublishImage = "publishImage"
	TriggerTypeCron      = "cron"
	TriggerTypeUser      = "user"
	TriggerTypeWebhook   = "webhook"

	StateWaiting  = "Waiting"
	StateBuilding = "Building"
	StateSuccess  = "Success"
	StateFail     = "Fail"
	StateError    = "Error"
	StateSkip     = "Skipped"
	StateAbort    = "Abort"
	StatePending  = "Pending"
	StateDenied   = "Denied"

	PipelineFinishLabel = "pipeline.management.cattle.io/finish"
	PipelineCronLabel   = "pipeline.management.cattle.io/cron"
)

Variables

View Source
var CIEndpoint = ""
View Source
var PreservedEnvVars = []string{
	"CICD_GIT_COMMIT",
	"CICD_GIT_REPO_NAME",
	"CICD_GIT_BRANCH",
	"CICD_GIT_URL",
	"CICD_GIT_TAG",
	"CICD_PIPELINE_ID",
	"CICD_PIPELINE_NAME",
	"CICD_TRIGGER_TYPE",
	"CICD_EXECUTION_ID",
	"CICD_EXECUTION_SEQUENCE",
}

Functions

func GenerateExecution

func GenerateExecution(pipelines v3.PipelineInterface, executions v3.PipelineExecutionInterface, pipeline *v3.Pipeline, triggerType string, triggerUserName string, branch string, commit string, envVars map[string]string) (*v3.PipelineExecution, error)

func InitClusterPipeline

func InitClusterPipeline(clusterPipelines v3.ClusterPipelineInterface, clusterName string) error

func InitExecution

func InitExecution(p *v3.Pipeline, triggerType string, triggerUserName string, branch string, commit string, envVars map[string]string) *v3.PipelineExecution

func IsExecutionFinish

func IsExecutionFinish(execution *v3.PipelineExecution) bool

func IsPipelineDeploy

func IsPipelineDeploy(clusterPipelineLister v3.ClusterPipelineLister, clusterName string) bool

func IsStageSuccess

func IsStageSuccess(stage v3.StageStatus) bool

func SplitImageTag

func SplitImageTag(image string) (string, string, string)

func UpdateEndpoint

func UpdateEndpoint(requestURL string) error

func ValidPipelineSpec

func ValidPipelineSpec(spec v3.PipelineSpec) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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