runner

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 54 Imported by: 2

Documentation

Overview

Copyright 2021 The Skaffold Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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 Builder added in v1.23.0

type Builder struct {
	// contains filtered or unexported fields
}

func (*Builder) ApplyDefaultRepo added in v1.23.0

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

ApplyDefaultRepo applies the default repo to a given image tag.

func (*Builder) Build added in v1.23.0

func (r *Builder) Build(ctx context.Context, out io.Writer, artifacts []*latest.Artifact) ([]graph.Artifact, error)

Build builds a list of artifacts.

func (*Builder) HasBuilt added in v1.23.0

func (r *Builder) HasBuilt() bool

HasBuilt returns true if this runner has built something.

type ChangeSet added in v1.23.0

type ChangeSet struct {
	// contains filtered or unexported fields
}

func (*ChangeSet) AddRebuild added in v1.23.0

func (c *ChangeSet) AddRebuild(a *latest.Artifact)

func (*ChangeSet) AddResync added in v1.23.0

func (c *ChangeSet) AddResync(s *sync.Item)

func (*ChangeSet) AddRetest added in v1.23.0

func (c *ChangeSet) AddRetest(a *latest.Artifact)

type Intents added in v1.23.0

type Intents struct {
	// contains filtered or unexported fields
}

func (*Intents) GetIntents added in v1.23.0

func (i *Intents) GetIntents() (bool, bool, bool)

returns build, sync, and deploy intents (in that order)

func (*Intents) IsAnyAutoEnabled added in v1.23.0

func (i *Intents) IsAnyAutoEnabled() bool

type Listener added in v0.34.0

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

type Pruner added in v1.23.0

type Pruner struct {
	build.Builder
}

func (*Pruner) Prune added in v1.23.0

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

type Runner added in v0.33.0

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 {
	Builder
	Pruner
	Tester
	// 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) Apply added in v1.21.0

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

Apply sends Kubernetes manifests to the cluster.

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 []graph.Artifact) error

func (*SkaffoldRunner) DeployAndLog added in v0.33.0

func (r *SkaffoldRunner) DeployAndLog(ctx context.Context, out io.Writer, artifacts []graph.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, test 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, configs []*latest.SkaffoldConfig, configPaths []string, fileOut string) error

func (*SkaffoldRunner) HasDeployed added in v0.20.0

func (r *SkaffoldRunner) HasDeployed() bool

HasDeployed returns true if this runner has deployed something.

func (*SkaffoldRunner) Render added in v0.39.0

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

type Tester added in v1.23.0

type Tester struct {
	// contains filtered or unexported fields
}

func (*Tester) Test added in v1.23.0

func (r *Tester) Test(ctx context.Context, out io.Writer, artifacts []graph.Artifact) error

Test tests a list of already built artifacts.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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