pipeline

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PipelineCmd = &cobra.Command{
	Use:   "pipeline",
	Short: "Manage Canoe pipelines",
	Long:  "Run and control Canoe pipelines",
}

Functions

func GetKubernetesConfig added in v0.12.0

func GetKubernetesConfig() (*rest.Config, error)

func TailLogs

func TailLogs(ctx context.Context, c kubernetes.Interface, pod *v1.Pod, container string)

func Watch

func Watch(ctx context.Context, c kubernetes.Interface, watchPod *v1.Pod) (<-chan WatchEvent, error)

Types

type PipelineDefinition

type PipelineDefinition struct {
	Pipeline  string                   `yaml:"pipeline"`
	Bucket    string                   `yaml:"bucket"`
	Namespace string                   `yaml:"namespace"`
	Steps     []PipelineDefinitionStep `yaml:"steps"`
	Secrets   []string
}

func ParsePipeline added in v0.12.0

func ParsePipeline(data []byte) *PipelineDefinition

type PipelineDefinitionStep

type PipelineDefinitionStep struct {
	Step    string `yaml:"step" json:"step"`
	Version string `yaml:"version" json:"version"`
	Branch  string `yaml:"branch" json:"branch"`
	Image   string `yaml:"image" json:"image"`
	Inputs  []struct {
		Step    string   `yaml:"step" json:"step"`
		Version string   `yaml:"version" json:"version"`
		Branch  string   `yaml:"branch" json:"branch"`
		Path    string   `yaml:"path" json:"path"`
		Bucket  string   `yaml:"bucket" json:"bucket"`
		Keys    []string `yaml:"keys" json:"keys"`
		Subdir  string   `yaml:"subdir" json:"subdir"`
	} `yaml:"inputs" json:"inputs"`
	Commands  []string `yaml:"commands" json:"commands"`
	Resources struct {
		CPU     int    `yaml:"cpu" json:"cpu"`
		Memory  string `yaml:"memory" json:"memory"`
		Storage int    `yaml:"storage-mb" json:"storage-mb"`
	} `yaml:"resources" json:"resources"`
}

func (*PipelineDefinitionStep) OverrideBranch added in v0.8.7

func (p *PipelineDefinitionStep) OverrideBranch(branch string, overrideInputs bool)

func (*PipelineDefinitionStep) OverrideTag added in v0.8.0

func (p *PipelineDefinitionStep) OverrideTag(tag string)

func (*PipelineDefinitionStep) OverrideVersion added in v0.8.7

func (p *PipelineDefinitionStep) OverrideVersion(version string, overrideInputs bool)

type PodDefinition

type PodDefinition struct {
	PodName         string
	StepName        string
	StepVersion     string
	BranchName      string
	Namespace       string
	Bucket          string
	Secrets         []PodSecret
	Env             []PodEnvVariable
	BucketOverrides map[string]string

	Step PipelineDefinitionStep
}

func NewPodDefinition

func NewPodDefinition(pipelineDefinition *PipelineDefinition, pipelineDefinitionStep *PipelineDefinitionStep) *PodDefinition

type PodEnvVariable added in v0.6.0

type PodEnvVariable struct {
	Name  string
	Value string
}

type PodSecret added in v0.4.1

type PodSecret struct {
	Name  string
	Store string
	Key   string
}

type WatchEvent

type WatchEvent struct {
	Type      WatchEventType
	Pod       *v1.Pod
	Container string
	Message   string
}

type WatchEventType

type WatchEventType string
const (
	Added     WatchEventType = "ADDED"
	Deleted   WatchEventType = "DELETED"
	Removed   WatchEventType = "REMOVED"
	Completed WatchEventType = "COMPLETED"
	Failed    WatchEventType = "FAILED"
)

Jump to

Keyboard shortcuts

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