dockerfile

package
v0.63.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FromInstruction = "FROM"
	ArgInstruction  = "ARG"
)

Variables

View Source
var (
	// DefaultFileMatch specifies accepted Helm chart metadata file name
	DefaultFileMatch []string = []string{
		"Dockerfile",
		"Dockerfile.*",
	}
)

Functions

This section is empty.

Types

type Dockerfile

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

Dockerfile hold all information needed to generate Dockerfile manifest.

func New

func New(spec interface{}, rootDir, scmID string) (Dockerfile, error)

New return a new valid Helm object.

func (Dockerfile) DiscoverManifests

func (h Dockerfile) DiscoverManifests() ([][]byte, error)

type MatchingRule

type MatchingRule struct {
	// Arch specifies a list of docker image architecture
	Archs []string
	// Path specifies a Dockerfile path pattern, the pattern requires to match all of name, not just a substring.
	Path string
	// Image specifies a list of docker image
	Images []string
}

MatchingRule allows to specifies rules to identify manifest

type MatchingRules

type MatchingRules []MatchingRule

type Spec

type Spec struct {
	// RootDir defines the root directory used to recursively search for Helm Chart
	RootDir string `yaml:",omitempty"`
	// Ignore allows to specify rule to ignore autodiscovery a specific Helm based on a rule
	Ignore MatchingRules `yaml:",omitempty"`
	// Only allows to specify rule to only autodiscover manifest for a specific Helm based on a rule
	Only MatchingRules `yaml:",omitempty"`
	// Auths provides a map of registry credentials where the key is the registry URL without scheme
	Auths map[string]docker.InlineKeyChain `yaml:",omitempty"`
	// FileMatch allows to override default Dockerfile file matching. Default ["Dockerfile"]
	FileMatch []string `yaml:",omitempty"`
	/*
		versionfilter provides parameters to specify the version pattern used when generating manifest.

		kind - semver
			versionfilter of kind `semver` uses semantic versioning as version filtering
			pattern accepts one of:
				`patch` - patch only update patch version
				`minor` - minor only update minor version
				`major` - major only update major versions
				`a version constraint` such as `>= 1.0.0`

		kind - regex
			versionfilter of kind `regex` uses regular expression as version filtering
			pattern accepts a valid regular expression

		example:
		“`
			versionfilter:
				kind: semver
				pattern: minor
		“`

		and its type like regex, semver, or just latest.
	*/
	VersionFilter version.Filter `yaml:",omitempty"`
}

Spec is a struct fill from Updatecli manifest data and shouldn't be modified at runtime unless For Fields that requires it, we can use the struct Dockerfile Spec defines the parameters which can be provided to the Dockerfile crawler.

Jump to

Keyboard shortcuts

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