chore: cleanup autodiscovery spec comment by olblak · Pull Request #9699 · updatecli/updatecli · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions pkg/plugins/autodiscovery/argocd/main.go
28 changes: 27 additions & 1 deletion pkg/plugins/autodiscovery/bazel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,33 @@ type Bazel struct {
rootDir string
// scmID holds the scmID used by the newly generated manifest
scmID string
// versionFilter holds the "valid" version.filter, that might be different from the user-specified filter (Spec.VersionFilter)
// `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:
// `prerelease` - Updatecli tries to identify the latest prerelease whatever it means
// `patch` - Updatecli only handles patch version update
// `minor` - Updatecli handles patch AND minor version update
// `minoronly` - Updatecli handles minor version only
// `major` - Updatecli handles patch, minor, AND major version update
// `majoronly` - Updatecli only handles major version update
// `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.
//
// More examples can be found at https://www.updatecli.io/docs/core/versionfilter/
versionFilter version.Filter
}

Expand Down
51 changes: 27 additions & 24 deletions pkg/plugins/autodiscovery/cargo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,33 @@ type Spec struct {
Only MatchingRules `yaml:",omitempty"`
// Auths provides a map of registry credentials where the key is the registry URL without scheme
Registries map[string]cargo.Registry `yaml:",omitempty"`
/*
`versionfilter` provides parameters to specify the version pattern to use 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` 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:
// `prerelease` - Updatecli tries to identify the latest prerelease whatever it means
// `patch` - Updatecli only handles patch version update
// `minor` - Updatecli handles patch AND minor version update
// `minoronly` - Updatecli handles minor version only
// `major` - Updatecli handles patch, minor, AND major version update
// `majoronly` - Updatecli only handles major version update
// `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.
//
// More examples can be found at https://www.updatecli.io/docs/core/versionfilter/
VersionFilter version.Filter `yaml:",omitempty"`
}

Expand Down
49 changes: 25 additions & 24 deletions pkg/plugins/autodiscovery/dockercompose/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,44 +31,45 @@ type Spec struct {
//
// example:
//
// ---
// ```
// auths:
// "ghcr.io":
// token: "xxx"
// "index.docker.io":
// username: "admin"
// password: "password"
// ---
// ```
//
Auths map[string]docker.InlineKeyChain `yaml:",omitempty"`
// FileMatch allows to override default docker-compose.yaml file matching. Default ["compose.yaml", "compose.yml", "compose.*.yaml", "compose.*.yml", "docker-compose.yaml","docker-compose.yml","docker-compose.*.yaml","docker-compose.*.yml"]
// FileMatch allows to override default docker-compose.yaml file matching. Default `["compose.yaml", "compose.yml", "compose.*.yaml", "compose.*.yml", "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/
// `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 - semver
// versionfilter of kind `semver` uses semantic versioning as version filtering
// pattern accepts one of:
// `prerelease` - Updatecli tries to identify the latest prerelease whatever it means
// `patch` - Updatecli only handles patch version update
// `minor` - Updatecli handles patch AND minor version update
// `minoronly` - Updatecli handles minor version only
// `major` - Updatecli handles patch, minor, AND major version update
// `majoronly` - Updatecli only handles major version update
// `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
// kind - regex
// versionfilter of kind `regex` uses regular expression as version filtering
// pattern accepts a valid regular expression
//
// example:
// ```
// versionfilter:
// kind: semver
// pattern: minor
//```
// example:
// ```
// versionfilter:
// kind: semver
// pattern: minor
// ```
//
// More version filter available at https://www.updatecli.io/docs/core/versionfilter/
// and its type like regex, semver, or just latest.
//
// More examples can be found at https://www.updatecli.io/docs/core/versionfilter/
VersionFilter version.Filter `yaml:",omitempty"`
}

Expand Down
27 changes: 15 additions & 12 deletions pkg/plugins/autodiscovery/dockerfile/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,42 +28,45 @@ type Spec struct {
//
// example:
//
// ---
// ```
// auths:
// "ghcr.io":
// token: "xxx"
// "index.docker.io":
// username: "admin"
// password: "password"
// ---
// ```
//
Auths map[string]docker.InlineKeyChain `yaml:",omitempty"`
// FileMatch allows to override default Dockerfile file matching. Default ["Dockerfile"]
// 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.
// `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
// `prerelease` - Updatecli tries to identify the latest prerelease whatever it means
// `patch` - Updatecli only handles patch version update
// `minor` - Updatecli handles patch AND minor version update
// `minoronly` - Updatecli handles minor version only
// `major` - Updatecli handles patch, minor, AND major version update
// `majoronly` - Updatecli only handles major version update
// `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
// versionfilter:
// kind: semver
// pattern: minor
// ```
//
// More version filter available at https://www.updatecli.io/docs/core/versionfilter/
// and its type like regex, semver, or just latest.
//
// More examples can be found at https://www.updatecli.io/docs/core/versionfilter/
VersionFilter version.Filter `yaml:",omitempty"`
}

Expand Down
53 changes: 28 additions & 25 deletions pkg/plugins/autodiscovery/fleet/main.go
Loading
Loading