Documentation
¶
Index ¶
- Constants
- func CreateComponents(t *latest.CustomTemplateTagger) (map[string]Tagger, error)
- func ExecuteCustomTemplate(customTemplate *template.Template, customMap map[string]string) (string, error)
- func GenerateFullyQualifiedImageName(t Tagger, workingDir, imageName string) (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
- type TaggerMux
Constants ¶
const DeprecatedImageName = "_DEPRECATED_IMAGE_NAME_"
Variables ¶
This section is empty.
Functions ¶
func CreateComponents ¶ added in v1.18.0
func CreateComponents(t *latest.CustomTemplateTagger) (map[string]Tagger, error)
CreateComponents creates a map of taggers for CustomTemplateTagger
func ExecuteCustomTemplate ¶ added in v1.7.1
func ExecuteCustomTemplate(customTemplate *template.Template, customMap map[string]string) (string, error)
ExecuteCustomTemplate executes a customTemplate against a custom map.
func GenerateFullyQualifiedImageName ¶ added in v1.7.1
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 ¶ added in v1.7.1
ParseCustomTemplate is a simple wrapper to parse an custom template.
func SetImageTag ¶ added in v1.7.1
Types ¶
type ChecksumTagger ¶
type ChecksumTagger struct{}
ChecksumTagger tags an image by the sha256 of the image tarball
func (*ChecksumTagger) GenerateTag ¶ added in v1.7.1
func (t *ChecksumTagger) GenerateTag(_, imageName string) (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 ¶ added in v0.28.0
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(workingDir, imageName string) (string, error) }
Tagger is an interface for tag strategies to be implemented against
func NewCustomTemplateTagger ¶ added in v1.7.1
NewCustomTemplateTagger creates a new customTemplateTagger
func NewDateTimeTagger ¶ added in v0.7.0
NewDateTimeTagger creates a tagger from a date format and timezone.
func NewEnvTemplateTagger ¶ added in v0.4.0
NewEnvTemplateTagger creates a new envTemplateTagger
func NewTaggerMux ¶ added in v1.18.0
func NewTaggerMux(runCtx *runcontext.RunContext) (Tagger, error)