dagger

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompilePipeline

func CompilePipeline(ctx context.Context, d *dagger.Client, name, src, gomod, pipeline string) (*dagger.Directory, error)

func New

Types

type Client

type Client struct {
	Opts  clients.CommonOpts
	Log   *logrus.Logger
	State *state.Observer
}

func (*Client) Done

func (c *Client) Done(ctx context.Context, w *pipeline.Collection) error

Done must be ran at the end of the pipeline. This is typically what takes the defined pipeline steps, runs them in the order defined, and produces some kind of output.

func (*Client) HandleRequiredArgs added in v0.13.0

func (c *Client) HandleRequiredArgs(ctx context.Context, d *dagger.Client, container *dagger.Container, step pipeline.Step) (*dagger.Container, map[string]string, error)

HandleRequiredArgs modifies the provided container to account for the arguments provided by and required by the provided step, then returns the modified container.

func (*Client) HandleStep added in v0.13.0

func (c *Client) HandleStep(ctx context.Context, step pipeline.Step, d *dagger.Client, wg *syncutil.WaitGroup, bin *dagger.Directory, src *dagger.Directory, path string) error

func (*Client) PipelineWalkFunc

func (c *Client) PipelineWalkFunc(w *pipeline.Collection, wg *syncutil.WaitGroup, bin, src *dagger.Directory, d *dagger.Client) pipeline.PipelineWalkFunc

PipelineWalkFunc is executed once for every set of parallel functions.

func (*Client) StepWalkFunc

func (c *Client) StepWalkFunc(d *dagger.Client, wg *syncutil.WaitGroup, bin *dagger.Directory, src *dagger.Directory, path string) pipeline.StepWalkFunc

StepWalkFunc executes the contents of the step using the CLI client and is called once per step.

func (*Client) Validate

func (c *Client) Validate(step pipeline.Step) error

Validate is ran internally before calling Run or Parallel and allows the client to effectively configure per-step requirements For example, Drone steps MUST have an image so the Drone client returns an error in this function when the provided step does not have an image. If the error encountered is not critical but should still be logged, then return a plumbing.ErrorSkipValidation. The error is checked with `errors.Is` so the error can be wrapped with fmt.Errorf.

func (*Client) WaitForArgs added in v0.11.0

func (c *Client) WaitForArgs(ctx context.Context, log logrus.FieldLogger, args state.Arguments)

Jump to

Keyboard shortcuts

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