pipeline

package
v0.0.0-...-350c570 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckNames

func CheckNames(p Pipeline) error

Verify that the pipeline name and pipeline stage names are valid.

Types

type Edge

type Edge struct {
	F Node
	T Node
	// contains filtered or unexported fields
}

func (Edge) From

func (e Edge) From() graph.Node

func (Edge) ID

func (e Edge) ID() int64

func (Edge) To

func (e Edge) To() graph.Node

type NameError

type NameError struct {
	OffendingName string
	Explanation   string
}

func (*NameError) Error

func (ne *NameError) Error() string

type Node

type Node struct {
	Name string
}

func (Node) DOTID

func (n Node) DOTID() string

func (Node) ID

func (n Node) ID() int64

type Parallelism

type Parallelism struct {
	Strategy string
	Constant int
}

type Pipeline

type Pipeline struct {
	Name      string
	Stages    []*Stage
	Comment   string
	Variables []Variable
	Commit    bool
	Runtime   time.Duration
	Version   string
}

func FindAndReplaceVariables

func FindAndReplaceVariables(p Pipeline, file []byte) (Pipeline, error)

Finds and replaces all variable names with their respective single values. On success it returns the file contents of the pipeline description file. For multi-value variables it will create one stage per variable value. We assume that these can run concurrently.

func ParseConfig

func ParseConfig(filename string) (*Pipeline, error)

Parses the pipeline configuration and returns the pipeline. It will verify that names are valid, find and replace variable names and create parallel pipeline stages.

func ReadPipelineDescription

func ReadPipelineDescription(file []byte, filename string) (Pipeline, error)

Read a pipeline description.

func (Pipeline) FixDependencies

func (p Pipeline) FixDependencies()

Since we support parallelizing stages, a stage has to wait for automatically generated stages. E.g. if we have parallelized stage input_A and input_B, both with following stages process_A and process_B. process_A will have to wait for input_A, but the pipeline definition will only list `input` as a dependency. This function fixes and cleans up the "dependency graph". NOTE TO SELF: refactor this one jesus christ it's bad.

func (Pipeline) String

func (p Pipeline) String() string

Stringify a pipeline description.

func (*Pipeline) WriteDOT

func (p *Pipeline) WriteDOT(filename string) error

func (Pipeline) WritePipelineDescription

func (p Pipeline) WritePipelineDescription(filename string) error

Write a pipeline description to a file.

type Stage

type Stage struct {
	Name             string
	Image            string
	Entrypoint       []string
	Cmd              []string
	Env              []string
	Inputs           []string
	Volumes          []string
	Parallelism      Parallelism
	Cache            bool
	Comment          string
	MountPropagation string
	Version          string

	Runtime time.Duration
	// contains filtered or unexported fields
}

func (Stage) String

func (stage Stage) String() string

Stringify a pipeline stage.

type Variable

type Variable struct {
	Name   string
	Values []string
}

func (Variable) String

func (v Variable) String() string

Jump to

Keyboard shortcuts

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