dockerimage

package
v0.55.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerImage

type DockerImage struct {
	// contains filtered or unexported fields
}

DockerImage defines a resource of type "dockerimage"

func New

func New(spec interface{}) (*DockerImage, error)

New returns a reference to a newly initialized DockerImage object from a dockerimage.Spec or an error if the provided Spec triggers a validation error.

func (*DockerImage) Changelog

func (di *DockerImage) Changelog() string

Changelog returns the changelog for this resource, or an empty string if not supported

func (*DockerImage) Condition

func (di *DockerImage) Condition(source string, scm scm.ScmHandler, resultCondition *result.Condition) error

Condition checks if a docker image with a specific tag is published We assume that if we can't retrieve the docker image digest, then it means it doesn't exist.

func (*DockerImage) Source

func (di *DockerImage) Source(workingDir string, resultSource *result.Source) error

func (*DockerImage) Target

func (di *DockerImage) Target(source string, scm scm.ScmHandler, dryRun bool, resultTarget *result.Target) error

type Spec

type Spec struct {
	// [C] architectures specifies a list of architectures to check container images for (conditions only)
	Architectures []string `yaml:",omitempty"`
	// [S][C] architecture specifies the container image architecture such as `amd64`
	Architecture string `yaml:",omitempty"`
	// [S][C] image specifies the container image such as `updatecli/updatecli`
	Image string `yaml:",omitempty"`
	// [C] tag specifies the container image tag such as `latest`
	Tag                   string `yaml:",omitempty"`
	docker.InlineKeyChain `yaml:",inline" mapstructure:",squash"`
	// [S] versionfilter provides parameters to specify version pattern and its type like regex, semver, or just latest.
	VersionFilter version.Filter `yaml:",omitempty"`
	// [S] tagfilter allows to restrict tags retrieved from a remote registry by using a regular expression.
	TagFilter string `yaml:",omitempty"`
}

Spec defines a specification for a "dockerimage" resource parsed from an updatecli manifest file

func NewDockerImageSpecFromImage added in v0.39.0

func NewDockerImageSpecFromImage(image, tag string, auths map[string]docker.InlineKeyChain) *Spec

NewDockerImageSpecFromImage return a new docker image specification using an image provided as parameter

Jump to

Keyboard shortcuts

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