Documentation ¶
Index ¶
- type Artifact
- type ArtifactCache
- type Builder
- type Cache
- func (c *Cache) CacheArtifacts(ctx context.Context, artifacts []*latest.Artifact, buildArtifacts []Artifact) error
- func (c *Cache) Retag(ctx context.Context, out io.Writer, artifactsToBuild []*latest.Artifact, ...)
- func (c *Cache) RetrieveCachedArtifacts(ctx context.Context, out io.Writer, artifacts []*latest.Artifact) ([]*latest.Artifact, []Artifact)
- type ImageDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶ added in v0.8.0
Artifact is the result corresponding to each successful build.
type ArtifactCache ¶ added in v0.24.0
type ArtifactCache map[string]ImageDetails
ArtifactCache is a map of [artifact dependencies hash : ImageDetails]
type Builder ¶
type Builder interface { Labels() map[string]string Build(ctx context.Context, out io.Writer, tags tag.ImageTags, artifacts []*latest.Artifact) ([]Artifact, error) DependenciesForArtifact(ctx context.Context, artifact *latest.Artifact) ([]string, error) }
Builder is an interface to the Build API of Skaffold. It must build and make the resulting image accesible to the cluster. This could include pushing to a authorized repository or loading the nodes with the image. If artifacts is supplied, the builder should only rebuild those artifacts.
func NewPreBuiltImagesBuilder ¶ added in v0.19.0
NewPreBuiltImagesBuilder returns an new instance a Builder that assumes images are already built with given fully qualified names.
type Cache ¶ added in v0.24.0
type Cache struct {
// contains filtered or unexported fields
}
Cache holds any data necessary for accessing the cache
func NewCache ¶ added in v0.24.0
func NewCache(builder Builder, opts *skafconfig.SkaffoldOptions, needsPush bool) *Cache
NewCache returns the current state of the cache
func (*Cache) CacheArtifacts ¶ added in v0.24.0
func (c *Cache) CacheArtifacts(ctx context.Context, artifacts []*latest.Artifact, buildArtifacts []Artifact) error
CacheArtifacts determines the hash for each artifact, stores it in the artifact cache, and saves the cache at the end
func (*Cache) Retag ¶ added in v0.24.0
func (c *Cache) Retag(ctx context.Context, out io.Writer, artifactsToBuild []*latest.Artifact, buildArtifacts []Artifact)
Retag retags newly built images in the format [imageName:workspaceHash] and pushes them if using a remote cluster
func (*Cache) RetrieveCachedArtifacts ¶ added in v0.24.0
func (c *Cache) RetrieveCachedArtifacts(ctx context.Context, out io.Writer, artifacts []*latest.Artifact) ([]*latest.Artifact, []Artifact)
RetrieveCachedArtifacts checks to see if artifacts are cached, and returns tags for cached images, otherwise a list of images to be built
type ImageDetails ¶ added in v0.24.0
type ImageDetails struct { Digest string `yaml:"digest,omitempty"` ID string `yaml:"id,omitempty"` }
ImageDetails holds the Digest and ID of an image