runner

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: Apache-2.0 Imports: 40 Imported by: 2

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 CreateComponents added in v1.7.1

func CreateComponents(t *latest.CustomTemplateTagger) (map[string]tag.Tagger, error)

CreateComponents creates a map of taggers for CustomTemplateTagger

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() error) error
	LogWatchToUser(io.Writer)
}

type Runner added in v0.33.0

type Runner interface {
	Dev(context.Context, io.Writer, []*latest.Artifact) error
	ApplyDefaultRepo(tag string) (string, error)
	BuildAndTest(context.Context, io.Writer, []*latest.Artifact) ([]build.Artifact, error)
	DeployAndLog(context.Context, io.Writer, []build.Artifact) error
	GeneratePipeline(context.Context, io.Writer, *latest.SkaffoldConfig, []string, string) error
	Render(context.Context, io.Writer, []build.Artifact, bool, string) 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
	// contains filtered or unexported fields
}

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() 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 {
	// contains filtered or unexported fields
}

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

func NewForConfig

func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error)

NewForConfig returns a new SkaffoldRunner for a SkaffoldConfig

func (*SkaffoldRunner) ApplyDefaultRepo added in v1.7.1

func (r *SkaffoldRunner) ApplyDefaultRepo(tag string) (string, error)

ApplyDefaultRepo applies the default repo to a given image tag.

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) Cleanup added in v0.35.0

func (r *SkaffoldRunner) Cleanup(ctx context.Context, out io.Writer) error

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) GeneratePipeline added in v0.36.0

func (r *SkaffoldRunner) GeneratePipeline(ctx context.Context, out io.Writer, config *latest.SkaffoldConfig, configPaths []string, fileOut string) 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.

func (*SkaffoldRunner) Prune added in v0.35.0

func (r *SkaffoldRunner) Prune(ctx context.Context, out io.Writer) error

func (*SkaffoldRunner) Render added in v0.39.0

func (r *SkaffoldRunner) Render(ctx context.Context, out io.Writer, builds []build.Artifact, offline bool, filepath string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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