Versions in this module Expand all Collapse all v0 v0.13.1 Feb 4, 2023 v0.13.0 Jan 26, 2023 v0.12.3 Jan 17, 2023 v0.12.2 Jan 5, 2023 v0.12.1 Jan 3, 2023 v0.12.0 Dec 19, 2022 Changes in this version + func PrintCollection(col *Collection) v0.11.1 Dec 12, 2022 Changes in this version + var ErrorNoPipelineProvider = errors.New("no pipeline in the graph provides a required argument") + var ErrorNoStepProvider = errors.New("no step in the graph provides a required argument") type Collection + Providers map[state.Argument]int64 + Root []int64 + func (c *Collection) BuildEdges(log logrus.FieldLogger, rootArgs ...state.Argument) error + func (c *Collection) SetProvider(arg state.Argument, id int64) error type Pipeline + ProvidedArgs state.Arguments + RequiredArgs state.Arguments + func (p Pipeline) Provides(args ...state.Argument) Pipeline + func (p Pipeline) Requires(args ...state.Argument) Pipeline v0.11.0 Dec 11, 2022 Changes in this version + var ClientProvidedArguments = []state.Argument + var ErrorAmbiguousProvider = errors.New("more than one step provides the same argument(s)") + var ErrorNoProvider = errors.New("no step in the graph provides a required argument") type Collection + func (c *Collection) BuildStepEdges(log logrus.FieldLogger, rootArgs ...state.Argument) error type Pipeline + Providers map[state.Argument]int64 + Root []int64 + func (p *Pipeline) BuildEdges(rootArgs ...state.Argument) error + func (p *Pipeline) SetProvider(arg state.Argument, id int64) error type Step + ProvidedArgs state.Arguments + RequiredArgs state.Arguments v0.10.0 Dec 4, 2022 Changes in this version + var ArgumentBranch = state.NewStringArgument("git-branch") + var ArgumentBuildID = state.NewStringArgument("build-id") + var ArgumentCommitRef = state.NewStringArgument("git-commit-ref") + var ArgumentCommitSHA = state.NewStringArgument("git-commit-sha") + var ArgumentDockerSocketFS = state.NewUnpackagedDirectoryArgument("docker-socket") + var ArgumentPipelineGoModFS = state.NewUnpackagedDirectoryArgument("pipeline-go-mod") + var ArgumentRemoteURL = state.NewStringArgument("remote-url") + var ArgumentSourceFS = state.NewUnpackagedDirectoryArgument("source") + var ArgumentTagName = state.NewStringArgument("git-tag") + var ArgumentWorkingDir = state.NewStringArgument("workdir") + var ErrorNoSteps = errors.New("no steps were provided") + var ErrorStepNotFound = errors.New("step not found") + var GitCommitEventArgs = []state.Argument + var GitTagEventArgs = []state.Argument + var NoOpStep = Step + var PullRequestEventArgs = []state.Argument + func PipelineNames(s []Pipeline) []string + func StepIDs(steps []Step) []int64 + func StepNames(s []Step) []string + type Action func(context.Context, ActionOpts) error + var DefaultAction Action = nil + type ActionOpts struct + Logger logrus.FieldLogger + Path string + State *state.State + Stderr io.Writer + Stdout io.Writer + Tracer opentracing.Tracer + Version string + type Artifact interface + type CacheCondition func() bool + type Cacher func(Step) + type Client interface + Done func(context.Context, Walker) error + Validate func(Step) error + type Collection struct + Graph *dag.Graph[Pipeline] + func NewCollection() *Collection + func NewCollectionWithSteps(pipelineName string, steps ...StepList) (*Collection, error) + func (c *Collection) AddEvents(pipelineID int64, events ...Event) error + func (c *Collection) AddPipelines(p ...Pipeline) error + func (c *Collection) AddSteps(pipelineID int64, steps StepList) error + func (c *Collection) ByID(ctx context.Context, id int64) ([]Step, error) + func (c *Collection) ByName(ctx context.Context, name string) ([]Step, error) + func (c *Collection) PipelinesByEvent(ctx context.Context, name string) ([]Pipeline, error) + func (c *Collection) PipelinesByName(ctx context.Context, names []string) ([]Pipeline, error) + func (c *Collection) WalkPipelines(ctx context.Context, wf PipelineWalkFunc) error + func (c *Collection) WalkSteps(ctx context.Context, pipelineID int64, wf StepWalkFunc) error + type Configurer interface + Value func(state.Argument) (string, error) + type EnvVar struct + Type EnvVarType + func NewEnvArgument(arg state.Argument) EnvVar + func NewEnvString(val string) EnvVar + func (e EnvVar) Argument() state.Argument + func (e EnvVar) String() string + type EnvVarType int + const EnvVarArgument + const EnvVarString + type Event struct + Filters map[string]*FilterValue + Name string + Provides []state.Argument + func GitCommitEvent(filters GitCommitFilters) Event + func GitTagEvent(filters GitTagFilters) Event + func PullRequestEvent(filters PullRequestFilters) Event + type FilterValue struct + Type FilterValueType + Value fmt.Stringer + func GlobFilter(v string) *FilterValue + func RegexpFilter(v *regexp.Regexp) *FilterValue + func StringFilter(v string) *FilterValue + func (f *FilterValue) String() string + type FilterValueType int + const FilterValueGlob + const FilterValueRegex + const FilterValueString + type GitCommitFilters struct + Branch *FilterValue + type GitTagFilters struct + Name *FilterValue + type Output interface + type Pipeline struct + Dependencies []Pipeline + Events []Event + Graph *dag.Graph[StepList] + ID int64 + Name string + Type PipelineType + func AdjNodesToPipelines(nodes []*dag.Node[Pipeline]) []Pipeline + func New(name string, id int64) Pipeline + func NodesToPipelines(nodes []dag.Node[Pipeline]) []Pipeline + func (p *Pipeline) AddSteps(id int64, steps StepList) error + type PipelineType int + const PipelineTypeDefault + const PipelineTypeSub + type PipelineWalkFunc func(context.Context, ...Pipeline) error + type PullRequestFilters struct + type Step struct + Action Action + Arguments []state.Argument + Dependencies []Step + Environment StepEnv + ID int64 + Image string + Name string + ProvidesArgs []state.Argument + Type StepType + func Combine(step ...Step) Step + func NamedStep(name string, action Action) Step + func NewStep(action Action) Step + func NodesToSteps(nodes []dag.Node[Step]) []Step + func (s Step) After(step Step) Step + func (s Step) IsBackground() bool + func (s Step) Provides(arg ...state.Argument) Step + func (s Step) Requires(args ...state.Argument) Step + func (s Step) ResetArguments() Step + func (s Step) WithEnvVar(key string, val EnvVar) Step + func (s Step) WithEnvironment(env StepEnv) Step + func (s Step) WithImage(image string) Step + func (s Step) WithInput(artifact Artifact) Step + func (s Step) WithName(name string) Step + func (s Step) WithOutput(artifact Artifact) Step + type StepEnv map[string]EnvVar + type StepList struct + Dependencies []StepList + ID int64 + Steps []Step + Type StepType + func NewStepList(id int64, steps ...Step) StepList + func NodeListToStepLists(nodes []dag.Node[StepList]) []StepList + func (s *StepList) Names() []string + func (s *StepList) String() string + type StepType int + const StepTypeBackground + const StepTypeDefault + type StepWalkFunc func(context.Context, ...Step) error + type Stringer string + func (s Stringer) String() string + type Walker interface + WalkPipelines func(context.Context, PipelineWalkFunc) error + WalkSteps func(context.Context, int64, StepWalkFunc) error