Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultFileMatch specifies the default file shell pattern to identify Nomad files DefaultFilePattern []string = []string{"*.nomad", "*.hcl"} )
Functions ¶
This section is empty.
Types ¶
type MatchingRule ¶
type MatchingRule struct {
// Path specifies a Nomad path pattern, the pattern requires to match all of name, not just a substring.
Path string
// Jobs specifies a list of Nomad job
Jobs []string
// Image specifies a list of docker image
Images []string
}
MatchingRule allows to specifies rules to identify manifest
type MatchingRules ¶
type MatchingRules []MatchingRule
type Nomad ¶
type Nomad struct {
// contains filtered or unexported fields
}
Nomad hold all information needed to generate Updatecli manifest to update Nomad configuration. Today we only support autodiscovering docker image tag and digest
func (Nomad) DiscoverManifests ¶
type Spec ¶
type Spec struct {
// digest provides parameters to specify if the generated manifest should use a digest on top of the tag.
Digest *bool `yaml:",omitempty"`
// rootDir defines the root directory used to recursively search for Nomad files
// If rootDir is not provided, the current working directory will be used.
// If rootDir is provided as an absolute path, scmID will be ignored.
// If rootDir is not provided but a scmid is, then rootDir will be set to the git repository root directory.
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 docker-compose.yaml file matching. Default ["docker-compose.yaml","docker-compose.yml","docker-compose.*.yaml","docker-compose.*.yml"]
FileMatch []string `yaml:",omitempty"`
// versionfilter provides parameters to specify the version pattern used when generating manifest.
//
// More information available at
// https://www.updatecli.io/docs/core/versionfilter/
//
// 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 DockerCompose Spec defines the parameters which can be provided to the Helm builder.
Click to show internal directories.
Click to hide internal directories.