dockerimage

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: MIT Imports: 9 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) (bool, 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) ConditionFromSCM

func (di *DockerImage) ConditionFromSCM(source string, scm scm.ScmHandler) (bool, error)

ConditionFromSCM returns an error because it's not supported

func (*DockerImage) Source

func (di *DockerImage) Source(workingDir string) (string, error)

func (*DockerImage) Target

func (di *DockerImage) Target(source string, dryRun bool) (bool, error)

func (*DockerImage) TargetFromSCM

func (di *DockerImage) TargetFromSCM(source string, scm scm.ScmHandler, dryRun bool) (bool, []string, string, error)

func (*DockerImage) Validate

func (di *DockerImage) Validate() error

Validate validates the object and returns an error (with all the failed validation messages) if it is not valid

type Spec

type Spec struct {
	// [S][C][T] Architecture specifies the container image architecture such as `amd64`
	Architecture string `yaml:",omitempty"`
	// [S][C][T] Image specifies the container image such as `updatecli/updatecli`
	Image string `yaml:",omitempty"`
	// [C][T] Tag specifies the container image tag such as `latest`
	Tag string `yaml:",omitempty"`
	// [S][C][T] Username specifies the container registry username to use for authentication. Not compatible with token
	Username string `yaml:",omitempty"`
	// [S][C][T] Password specifies the container registry password to use for authentication. Not compatible with token
	Password string `yaml:",omitempty"`
	// [S][C][T] Token specifies the container registry token to use for authentication. Not compatible with username/password
	Token string `yaml:",omitempty"`
	// [S] VersionFilter provides parameters to specify version pattern and its type like regex, semver, or just latest.
	VersionFilter version.Filter `yaml:",omitempty"`
}

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

Jump to

Keyboard shortcuts

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