Documentation ¶
Index ¶
- func CompilePipeline(ctx context.Context, d *dagger.Client, name, src, gomod, pipeline string) (*dagger.Directory, error)
- func New(ctx context.Context, opts clients.CommonOpts) (pipeline.Client, error)
- type Client
- func (c *Client) Done(ctx context.Context, w *pipeline.Collection) error
- func (c *Client) HandleState(ctx context.Context, d *dagger.Client, container *dagger.Container, ...) (*dagger.Container, map[string]string, error)
- func (c *Client) PipelineWalkFunc(w *pipeline.Collection, wg *syncutil.WaitGroup, d *dagger.Client) pipeline.PipelineWalkFunc
- func (c *Client) StepWalkFunc(d *dagger.Client, wg *syncutil.WaitGroup, bin *dagger.Directory, ...) pipeline.StepWalkFunc
- func (c *Client) Validate(step pipeline.Step) error
- func (c *Client) WaitForArgs(ctx context.Context, log logrus.FieldLogger, args state.Arguments)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompilePipeline ¶
Types ¶
type Client ¶
func (*Client) Done ¶
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) HandleState ¶ added in v0.11.0
func (*Client) PipelineWalkFunc ¶
func (c *Client) PipelineWalkFunc(w *pipeline.Collection, wg *syncutil.WaitGroup, 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 ¶
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.