runner

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2019 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorConfigurationChanged = errors.New("configuration changed")

ErrorConfigurationChanged is a special error that's returned when the skaffold configuration was changed.

Functions

func WithNotification added in v0.6.1

func WithNotification(d deploy.Deployer) deploy.Deployer

WithNotification creates a deployer that bips each time a deploy is done.

func WithTimings added in v0.6.1

func WithTimings(b build.Builder, t test.Tester, d deploy.Deployer, cacheArtifacts bool) (build.Builder, test.Tester, deploy.Deployer)

WithTimings creates a deployer that logs the duration of each phase.

Types

type Listener added in v0.34.0

type Listener interface {
	WatchForChanges(context.Context, io.Writer, func(context.Context, io.Writer) error) error
	LogWatchToUser(io.Writer)
}

type Runner added in v0.33.0

type Runner interface {
	DiagnoseArtifacts(io.Writer) error
	Dev(context.Context, io.Writer, []*latest.Artifact) error
	BuildAndTest(context.Context, io.Writer, []*latest.Artifact) ([]build.Artifact, error)
	DeployAndLog(context.Context, io.Writer, []build.Artifact) error
	Cleanup(context.Context, io.Writer) error
	Prune(context.Context, io.Writer) error
	HasDeployed() bool
	HasBuilt() bool
}

Runner is responsible for running the skaffold build, test and deploy config.

type SkaffoldListener added in v0.34.0

type SkaffoldListener struct {
	Monitor filemon.Monitor
	Trigger trigger.Trigger
}

func (*SkaffoldListener) LogWatchToUser added in v0.34.0

func (l *SkaffoldListener) LogWatchToUser(out io.Writer)

func (*SkaffoldListener) WatchForChanges added in v0.34.0

func (l *SkaffoldListener) WatchForChanges(ctx context.Context, out io.Writer, devLoop func(context.Context, io.Writer) error) error

WatchForChanges listens to a trigger, and when one is received, computes file changes and conditionally runs the dev loop.

type SkaffoldRunner

type SkaffoldRunner struct {
	// TODO(nkubala): make embedded fields private
	build.Builder
	deploy.Deployer
	test.Tester
	tag.Tagger
	sync.Syncer
	// contains filtered or unexported fields
}

SkaffoldRunner is responsible for running the skaffold build, test and deploy config.

func NewForConfig

func NewForConfig(opts *config.SkaffoldOptions, cfg *latest.SkaffoldConfig) (*SkaffoldRunner, error)

NewForConfig returns a new SkaffoldRunner for a SkaffoldConfig

func (*SkaffoldRunner) BuildAndTest added in v0.19.0

func (r *SkaffoldRunner) BuildAndTest(ctx context.Context, out io.Writer, artifacts []*latest.Artifact) ([]build.Artifact, error)

BuildAndTest builds and tests a list of artifacts.

func (*SkaffoldRunner) Deploy added in v0.20.0

func (r *SkaffoldRunner) Deploy(ctx context.Context, out io.Writer, artifacts []build.Artifact) error

func (*SkaffoldRunner) DeployAndLog added in v0.33.0

func (r *SkaffoldRunner) DeployAndLog(ctx context.Context, out io.Writer, artifacts []build.Artifact) error

DeployAndLog deploys a list of already built artifacts and optionally show the logs.

func (*SkaffoldRunner) Dev added in v0.6.0

func (r *SkaffoldRunner) Dev(ctx context.Context, out io.Writer, artifacts []*latest.Artifact) error

Dev watches for changes and runs the skaffold build and deploy config until interrupted by the user.

func (*SkaffoldRunner) DiagnoseArtifacts added in v0.27.0

func (r *SkaffoldRunner) DiagnoseArtifacts(out io.Writer) error

func (*SkaffoldRunner) HasBuilt added in v0.27.0

func (r *SkaffoldRunner) HasBuilt() bool

HasBuilt returns true if this runner has built something.

func (*SkaffoldRunner) HasDeployed added in v0.20.0

func (r *SkaffoldRunner) HasDeployed() bool

HasDeployed returns true if this runner has deployed something.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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