Documentation ¶
Index ¶
- func CreateComponents(runCtx *runcontext.RunContext, t *latest.CustomTemplateTagger) (map[string]Tagger, error)
- func ExecuteCustomTemplate(customTemplate *template.Template, customMap map[string]string) (string, error)
- func GenerateFullyQualifiedImageName(t Tagger, image latest.Artifact) (string, error)
- func ParseCustomTemplate(t string) (*template.Template, error)
- func SetImageTag(image, tag string) (string, error)
- func StripTags(taggedImages []string) []string
- type ChecksumTagger
- type CustomTag
- type GitCommit
- type ImageTags
- type Tagger
- func NewCustomTemplateTagger(t string, components map[string]Tagger) (Tagger, error)
- func NewDateTimeTagger(format, timezone string) Tagger
- func NewEnvTemplateTagger(t string) (Tagger, error)
- func NewInputDigestTagger(cfg docker.Config, ag graph.ArtifactGraph) (Tagger, error)
- func NewTaggerMux(runCtx *runcontext.RunContext) (Tagger, error)
- type TaggerMux
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateComponents ¶
func CreateComponents(runCtx *runcontext.RunContext, t *latest.CustomTemplateTagger) (map[string]Tagger, error)
CreateComponents creates a map of taggers for CustomTemplateTagger
func ExecuteCustomTemplate ¶
func ExecuteCustomTemplate(customTemplate *template.Template, customMap map[string]string) (string, error)
ExecuteCustomTemplate executes a customTemplate against a custom map.
func GenerateFullyQualifiedImageName ¶
GenerateFullyQualifiedImageName resolves the fully qualified image name for an artifact. The workingDir is the root directory of the artifact with respect to the Skaffold root, and imageName is the base name of the image.
func ParseCustomTemplate ¶
ParseCustomTemplate is a simple wrapper to parse an custom template.
func SetImageTag ¶
Types ¶
type ChecksumTagger ¶
type ChecksumTagger struct{}
ChecksumTagger tags an image by the sha256 of the image tarball
func (*ChecksumTagger) GenerateTag ¶
func (t *ChecksumTagger) GenerateTag(image latest.Artifact) (string, error)
GenerateTag returns either the current tag or `latest`.
type GitCommit ¶
type GitCommit struct {
// contains filtered or unexported fields
}
GitCommit tags an image by the git commit it was built at.
func NewGitCommit ¶
NewGitCommit creates a new git commit tagger. It fails if the tagger variant is invalid.
type Tagger ¶
type Tagger interface { // GenerateTag generates a tag for an artifact. GenerateTag(image latest.Artifact) (string, error) }
Tagger is an interface for tag strategies to be implemented against
func NewCustomTemplateTagger ¶
NewCustomTemplateTagger creates a new customTemplateTagger
func NewDateTimeTagger ¶
NewDateTimeTagger creates a tagger from a date format and timezone.
func NewEnvTemplateTagger ¶
NewEnvTemplateTagger creates a new envTemplateTagger
func NewInputDigestTagger ¶ added in v1.22.0
func NewTaggerMux ¶
func NewTaggerMux(runCtx *runcontext.RunContext) (Tagger, error)