Documentation ¶
Index ¶
- func HashTag(a *latest.Artifact) string
- type ArtifactCache
- type Cache
- func (c *Cache) CacheArtifacts(ctx context.Context, artifacts []*latest.Artifact, ...) error
- func (c *Cache) RetagLocalImages(ctx context.Context, out io.Writer, artifactsToBuild []*latest.Artifact, ...)
- func (c *Cache) RetrieveCachedArtifacts(ctx context.Context, out io.Writer, artifacts []*latest.Artifact) ([]*latest.Artifact, []build.Artifact, error)
- type ImageDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArtifactCache ¶
type ArtifactCache map[string]ImageDetails
ArtifactCache is a map of [artifact dependencies hash : ImageDetails]
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache holds any data necessary for accessing the cache
func NewCache ¶
func NewCache(builder build.Builder, runCtx *runcontext.RunContext) *Cache
NewCache returns the current state of the cache
func (*Cache) CacheArtifacts ¶
func (c *Cache) CacheArtifacts(ctx context.Context, artifacts []*latest.Artifact, buildArtifacts []build.Artifact) error
CacheArtifacts determines the hash for each artifact, stores it in the artifact cache, and saves the cache at the end
func (*Cache) RetagLocalImages ¶ added in v0.26.0
func (c *Cache) RetagLocalImages(ctx context.Context, out io.Writer, artifactsToBuild []*latest.Artifact, buildArtifacts []build.Artifact)
Retag retags newly built images in the format [imageName:workspaceHash] and pushes them if using a remote cluster
func (*Cache) RetrieveCachedArtifacts ¶
func (c *Cache) RetrieveCachedArtifacts(ctx context.Context, out io.Writer, artifacts []*latest.Artifact) ([]*latest.Artifact, []build.Artifact, error)
RetrieveCachedArtifacts checks to see if artifacts are cached, and returns tags for cached images, otherwise a list of images to be built
type ImageDetails ¶
type ImageDetails struct { Digest string `yaml:"digest,omitempty"` ID string `yaml:"id,omitempty"` }
ImageDetails holds the Digest and ID of an image
Click to show internal directories.
Click to hide internal directories.