cli

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorCLIStepHasImage = errors.New("step has a docker image specified. This may cause unexpected results if ran with the CLI client. The `-client=docker` flag is likely more suitable")
)
View Source
var KnownValues = map[state.Argument]func(*state.State) error{
	pipeline.ArgumentRemoteURL:  setCurrentRemote,
	pipeline.ArgumentCommitRef:  setCurrentCommit,
	pipeline.ArgumentBranch:     setCurrentBranch,
	pipeline.ArgumentWorkingDir: setWorkingDir,
	pipeline.ArgumentSourceFS:   setSourceFS,
	pipeline.ArgumentBuildID:    setBuildID,
}

KnownValues are URL values that we know how to retrieve using the command line.

Functions

func New

Types

type Client

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

The Client is used when interacting with a scribe pipeline using the scribe CLI. In order to emulate what happens in a remote environment, the steps are put into a queue before being ran.

func (*Client) Done

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

func (*Client) HandleEvents

func (c *Client) HandleEvents(events []pipeline.Event) error

func (*Client) PipelineWalkFunc

func (c *Client) PipelineWalkFunc(w pipeline.Walker, wf pipeline.StepWalkFunc) func(context.Context, ...pipeline.Pipeline) error

PipelineWalkFunc walks through the pipelines that the collection provides. Each pipeline is a pipeline of steps, so each will walk through the list of steps using the StepWalkFunc.

func (*Client) StepWalkFunc

func (c *Client) StepWalkFunc(ctx context.Context, steps ...pipeline.Step) error

StepWalkFunc walks through the steps that the collection provides.

func (*Client) Validate

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

Jump to

Keyboard shortcuts

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