Documentation ¶
Index ¶
- Variables
- func CheckWorkspaces(artifacts []*latest.Artifact) error
- func GetBuilder(ctx context.Context, r *runcontext.RunContext, s build.ArtifactStore, ...) (build.PipelineBuilder, error)
- func GetDeployer(ctx context.Context, runCtx *runcontext.RunContext, ...) (deploy.Deployer, error)
- func GetRenderer(ctx context.Context, runCtx *runcontext.RunContext, hydrationDir string, ...) (renderer.Renderer, error)
- func GetVerifier(ctx context.Context, runCtx *runcontext.RunContext, ...) (verify.Verifier, error)
- func WithNotification(d deploy.Deployer) deploy.Deployer
- func WithTimings(b build.Builder, t test.Tester, r renderer.Renderer, d deploy.Deployer, ...) (build.Builder, test.Tester, renderer.Renderer, deploy.Deployer)
- type Builder
- type ChangeSet
- func (c *ChangeSet) AddRebuild(a *latest.Artifact)
- func (c *ChangeSet) AddResync(s *sync.Item)
- func (c *ChangeSet) AddRetest(a *latest.Artifact)
- func (c *ChangeSet) NeedsRebuild() []*latest.Artifact
- func (c *ChangeSet) NeedsRedeploy() bool
- func (c *ChangeSet) NeedsReload() bool
- func (c *ChangeSet) NeedsResync() []*sync.Item
- func (c *ChangeSet) NeedsRetest() map[string]bool
- func (c *ChangeSet) Redeploy()
- func (c *ChangeSet) Reload()
- func (c *ChangeSet) ResetBuild()
- func (c *ChangeSet) ResetDeploy()
- func (c *ChangeSet) ResetSync()
- func (c *ChangeSet) ResetTest()
- type Intents
- func (i *Intents) GetAutoBuild() bool
- func (i *Intents) GetAutoDeploy() bool
- func (i *Intents) GetAutoDevloop() bool
- func (i *Intents) GetAutoSync() bool
- func (i *Intents) GetIntents() (bool, bool, bool)
- func (i *Intents) GetIntentsAttrs() (bool, bool, bool)
- func (i *Intents) IsAnyAutoEnabled() bool
- func (i *Intents) Reset()
- func (i *Intents) ResetBuild()
- func (i *Intents) ResetDeploy()
- func (i *Intents) ResetSync()
- func (i *Intents) SetAutoBuild(val bool)
- func (i *Intents) SetAutoDeploy(val bool)
- func (i *Intents) SetAutoDevloop(val bool)
- func (i *Intents) SetAutoSync(val bool)
- func (i *Intents) SetBuild(val bool)
- func (i *Intents) SetDeploy(val bool)
- func (i *Intents) SetDevloop(val bool)
- func (i *Intents) SetSync(val bool)
- type Listener
- type Pruner
- type Runner
- type SkaffoldListener
- type SkaffoldRunner
- func (r *SkaffoldRunner) Apply(ctx context.Context, out io.Writer) error
- func (r *SkaffoldRunner) Cleanup(ctx context.Context, out io.Writer, dryRun bool, ...) error
- func (r *SkaffoldRunner) Deploy(ctx context.Context, out io.Writer, artifacts []graph.Artifact, ...) error
- func (r *SkaffoldRunner) DeployAndLog(ctx context.Context, out io.Writer, artifacts []graph.Artifact, ...) error
- func (r *SkaffoldRunner) DeployManifests() manifest.ManifestListByConfig
- func (r *SkaffoldRunner) Dev(ctx context.Context, out io.Writer, artifacts []*latest.Artifact) error
- func (r *SkaffoldRunner) GeneratePipeline(ctx context.Context, out io.Writer, configs []util.VersionedConfig, ...) error
- func (r *SkaffoldRunner) Render(ctx context.Context, out io.Writer, builds []graph.Artifact, offline bool) (manifest.ManifestListByConfig, error)
- func (r *SkaffoldRunner) Test(ctx context.Context, out io.Writer, artifacts []graph.Artifact) error
- func (r *SkaffoldRunner) Verify(ctx context.Context, out io.Writer, artifacts []graph.Artifact) error
- func (r *SkaffoldRunner) VerifyAndLog(ctx context.Context, out io.Writer, artifacts []graph.Artifact) error
Constants ¶
This section is empty.
Variables ¶
var ErrorConfigurationChanged = errors.New("configuration changed")
ErrorConfigurationChanged is a special error that's returned when the skaffold configuration was changed.
Functions ¶
func CheckWorkspaces ¶
func GetBuilder ¶
func GetBuilder(ctx context.Context, r *runcontext.RunContext, s build.ArtifactStore, d graph.SourceDependenciesCache, p latest.Pipeline) (build.PipelineBuilder, error)
GetBuilder creates a builder from a given RunContext and build pipeline type.
func GetDeployer ¶
func GetDeployer(ctx context.Context, runCtx *runcontext.RunContext, labeller *label.DefaultLabeller, hydrationDir string, usingLegacyHelmDeploy bool) (deploy.Deployer, error)
GetDeployer creates a deployer from a given RunContext and deploy pipeline definitions.
func GetRenderer ¶
func GetRenderer(ctx context.Context, runCtx *runcontext.RunContext, hydrationDir string, labels map[string]string, usingLegacyHelmDeploy bool) (renderer.Renderer, error)
GetRenderer creates a renderer from a given RunContext and pipeline definitions.
func GetVerifier ¶
func GetVerifier(ctx context.Context, runCtx *runcontext.RunContext, labeller *label.DefaultLabeller) (verify.Verifier, error)
GetVerifier creates a verifier from a given RunContext and deploy pipeline definitions.
func WithNotification ¶
WithNotification creates a deployer that bips each time a deploy is done.
Types ¶
type Builder ¶
type Builder struct { Builder build.Builder Builds []graph.Artifact // contains filtered or unexported fields }
func NewBuilder ¶
func (*Builder) ApplyDefaultRepo ¶
ApplyDefaultRepo applies the default repo to a given image tag.
func (*Builder) Build ¶
func (r *Builder) Build(ctx context.Context, out io.Writer, artifacts []*latest.Artifact) ([]graph.Artifact, error)
Build builds a list of artifacts.
type ChangeSet ¶
type ChangeSet struct {
// contains filtered or unexported fields
}
func (*ChangeSet) AddRebuild ¶
func (*ChangeSet) NeedsRebuild ¶
NeedsRebuild gets the value of needsRebuild, which itself is not expected to be changed outside ChangeSet
func (*ChangeSet) NeedsRedeploy ¶
NeedsRedeploy gets the value of needsRedeploy, which itself is not expected to be changed outside ChangeSet
func (*ChangeSet) NeedsReload ¶
NeedsReload gets the value of needsReload, which itself is not expected to be changed outside ChangeSet
func (*ChangeSet) NeedsResync ¶
NeedsResync gets the value of needsResync, which itself is not expected to be changed outside ChangeSet
func (*ChangeSet) NeedsRetest ¶
NeedsRetest gets the value of needsRetest, which itself is not expected to be changed outside ChangeSet
func (*ChangeSet) Redeploy ¶
func (c *ChangeSet) Redeploy()
Redeploy marks that deploy is expected to happen.
func (*ChangeSet) Reload ¶
func (c *ChangeSet) Reload()
Reload marks that reload is expected to happen.
func (*ChangeSet) ResetBuild ¶
func (c *ChangeSet) ResetBuild()
func (*ChangeSet) ResetDeploy ¶
func (c *ChangeSet) ResetDeploy()
type Intents ¶
type Intents struct {
// contains filtered or unexported fields
}
func NewIntents ¶
func (*Intents) GetAutoBuild ¶
func (*Intents) GetAutoDeploy ¶
func (*Intents) GetAutoDevloop ¶
func (*Intents) GetAutoSync ¶
func (*Intents) GetIntents ¶
GetIntents returns build, sync, and deploy intents (in that order) If intent is devloop intent, all are returned true
func (*Intents) GetIntentsAttrs ¶
GetIntentsAttrs returns the intent attributes for testing only.
func (*Intents) IsAnyAutoEnabled ¶
func (*Intents) ResetBuild ¶
func (i *Intents) ResetBuild()
func (*Intents) ResetDeploy ¶
func (i *Intents) ResetDeploy()
func (*Intents) SetAutoBuild ¶
func (*Intents) SetAutoDeploy ¶
func (*Intents) SetAutoDevloop ¶
func (*Intents) SetAutoSync ¶
func (*Intents) SetDevloop ¶
type Runner ¶
type Runner interface { Apply(context.Context, io.Writer) error ApplyDefaultRepo(tag string) (string, error) Build(context.Context, io.Writer, []*latest.Artifact) ([]graph.Artifact, error) Cleanup(context.Context, io.Writer, bool, manifest.ManifestListByConfig, string) error Dev(context.Context, io.Writer, []*latest.Artifact) error // Deploy and DeployAndLog: Do they need the `graph.Artifact` and could use render output. Deploy(context.Context, io.Writer, []graph.Artifact, manifest.ManifestListByConfig) error DeployAndLog(context.Context, io.Writer, []graph.Artifact, manifest.ManifestListByConfig) error GeneratePipeline(context.Context, io.Writer, []util.VersionedConfig, []string, string) error HasBuilt() bool DeployManifests() manifest.ManifestListByConfig Prune(context.Context, io.Writer) error Render(ctx context.Context, out io.Writer, builds []graph.Artifact, offline bool) (manifest.ManifestListByConfig, error) Test(context.Context, io.Writer, []graph.Artifact) error Verify(context.Context, io.Writer, []graph.Artifact) error VerifyAndLog(context.Context, io.Writer, []graph.Artifact) error }
Runner is responsible for running the skaffold build, test and deploy config.
type SkaffoldListener ¶
type SkaffoldListener struct { Monitor filemon.Monitor Trigger trigger.Trigger // contains filtered or unexported fields }
func NewSkaffoldListener ¶
func NewSkaffoldListener(monitor filemon.Monitor, trigger trigger.Trigger, cache graph.SourceDependenciesCache, intentChan <-chan bool) *SkaffoldListener
func (*SkaffoldListener) LogWatchToUser ¶
func (l *SkaffoldListener) LogWatchToUser(out io.Writer)
func (*SkaffoldListener) WatchForChanges ¶
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 ¶
SkaffoldRunner is responsible for running the skaffold build, test and deploy config.
func NewForConfig ¶
func NewForConfig(ctx context.Context, runCtx *runcontext.RunContext) (*SkaffoldRunner, error)
NewForConfig returns a new SkaffoldRunner for a SkaffoldConfig
func (*SkaffoldRunner) Cleanup ¶
func (r *SkaffoldRunner) Cleanup(ctx context.Context, out io.Writer, dryRun bool, manifestListByConfig manifest.ManifestListByConfig, command string) error
func (*SkaffoldRunner) Deploy ¶
func (r *SkaffoldRunner) Deploy(ctx context.Context, out io.Writer, artifacts []graph.Artifact, list manifest.ManifestListByConfig) error
func (*SkaffoldRunner) DeployAndLog ¶
func (r *SkaffoldRunner) DeployAndLog(ctx context.Context, out io.Writer, artifacts []graph.Artifact, list manifest.ManifestListByConfig) error
DeployAndLog deploys a list of already built artifacts and optionally show the logs.
func (*SkaffoldRunner) DeployManifests ¶
func (r *SkaffoldRunner) DeployManifests() manifest.ManifestListByConfig
DeployManifests returns a list of manifest if this runner has deployed something.
func (*SkaffoldRunner) Dev ¶
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 ¶
func (r *SkaffoldRunner) GeneratePipeline(ctx context.Context, out io.Writer, configs []util.VersionedConfig, configPaths []string, fileOut string) error
func (*SkaffoldRunner) VerifyAndLog ¶
func (r *SkaffoldRunner) VerifyAndLog(ctx context.Context, out io.Writer, artifacts []graph.Artifact) error
VerifyAndLog deploys a list of already built artifacts and optionally show the logs.