Documentation ¶
Index ¶
- func ParseOCIReferenceInfo(reference string) (ociName, ociTag, ociDigest string, err error)
- type DockerImage
- func (di *DockerImage) Changelog() string
- func (di *DockerImage) Condition(source string, scm scm.ScmHandler) (pass bool, message string, err error)
- func (di *DockerImage) Source(workingDir string, resultSource *result.Source) error
- func (di *DockerImage) Target(source string, scm scm.ScmHandler, dryRun bool, resultTarget *result.Target) error
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseOCIReferenceInfo ¶ added in v0.73.0
ParseOCIReferenceInfo returns the OCI name, tag and digest from an OCI reference
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) (pass bool, message string, err 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 { // architectures specifies a list of architectures to check container images for (conditions only) // // compatible: // * condition // * source // // example: windows/amd64, linux/arm64, linux/arm64/v8 // // default: linux/amd64 // // remark: // If an architecture is undefined, Updatecli retrieves the digest of the image index // which can be used regardless of the architecture. // But if an architecture is specified then Updatecli retrieves a specific image digest. // More information on https://github.com/updatecli/updatecli/issues/1603 Architectures []string `yaml:",omitempty"` // architecture specifies the container image architecture such as `amd64` // // compatible: // * condition // * source // // example: windows/amd64, linux/arm64, linux/arm64/v8 // // default: linux/amd64 // // remark: // If an architecture is undefined, Updatecli retrieves the digest of the image index // which can be used regardless of the architecture. // But if an architecture is specified then Updatecli retrieves a specific image digest. // More information on https://github.com/updatecli/updatecli/issues/1603 Architecture string `yaml:",omitempty"` // image specifies the container image such as `updatecli/updatecli` // // compatible: // * condition // * source Image string `yaml:",omitempty"` // tag specifies the container image tag such as `latest` // // compatible: // * condition // // default: latest Tag string `yaml:",omitempty"` docker.InlineKeyChain `yaml:",inline" mapstructure:",squash"` // versionfilter provides parameters to specify version pattern and its type like regex, semver, or just latest. // // compatible: // * source // // default: // kind: latest VersionFilter version.Filter `yaml:",omitempty"` // tagfilter allows to restrict tags retrieved from a remote registry by using a regular expression. // // compatible: // * source // // example: ^v\d*(\.\d*){2}-alpine$ // // default: none 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