cli

package
v0.9.16 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 11 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 in CLI mode. The `-mode=docker` flag is likely more suitable")
)
View Source
var KnownValues = map[pipeline.Argument]func(*pipeline.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

This section is empty.

Types

type Client

type Client struct {
	Opts pipeline.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