tag

package
v1.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DeprecatedImageName = "_DEPRECATED_IMAGE_NAME_"

Variables

This section is empty.

Functions

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

func GenerateFullyQualifiedImageName(t Tagger, workingDir, imageName string) (string, error)

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

func ParseCustomTemplate(t string) (*template.Template, error)

ParseCustomTemplate is a simple wrapper to parse an custom template.

func StripTags added in v1.7.1

func StripTags(taggedImages []string) []string

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 CustomTag added in v0.2.0

type CustomTag struct {
	Tag string
}

func (*CustomTag) GenerateTag added in v1.7.1

func (t *CustomTag) GenerateTag(_, _ string) (string, error)

GenerateTag generates a tag using the custom tag.

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

func NewGitCommit(prefix, variant string) (*GitCommit, error)

NewGitCommit creates a new git commit tagger. It fails if the tagger variant is invalid.

func (*GitCommit) GenerateTag added in v1.7.1

func (t *GitCommit) GenerateTag(workingDir, _ string) (string, error)

GenerateTag generates a tag from the git commit.

type ImageTags added in v0.23.0

type ImageTags map[string]string

ImageTags maps image names to tags

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

func NewCustomTemplateTagger(t string, components map[string]Tagger) (Tagger, error)

NewCustomTemplateTagger creates a new customTemplateTagger

func NewDateTimeTagger added in v0.7.0

func NewDateTimeTagger(format, timezone string) Tagger

NewDateTimeTagger creates a tagger from a date format and timezone.

func NewEnvTemplateTagger added in v0.4.0

func NewEnvTemplateTagger(t string) (Tagger, error)

NewEnvTemplateTagger creates a new envTemplateTagger

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL