Updatecli
Description
The updatecli crawler looks recursively for Updatecli compose files and updates the version of each policy they reference.
Two file names are scanned by default:
updatecli-compose.yamlupdate-compose.yaml, the deprecated name
Override them with the files parameter.
Policies are OCI artifacts, so a compose file such as the following has its policy version bumped:
policies:
- name: Update Golang
policy: ghcr.io/updatecli/policies/autodiscovery/golang:0.4.0This crawler is enabled by default, so it can be used either automatically by running updatecli diff from a directory containing the files to update, or by providing a manifest.
The automatic discovery behavior can be tuned by providing a YAML manifest with an updatecli crawler in top-level directive autodiscovery as explained in the "Autodiscovery" page.
Generated manifests
Each policy produces a dockerimage source for the latest version, a dockerdigest source resolving the digest behind it, and a yaml target writing the reference back into the compose file.
Authentication
Use auths to reach a private policy registry, keyed by registry URL without a scheme, accepting either a token or a username/password pair. When it is empty Updatecli falls back to the ambient OCI credentials, such as those written by docker login.
Manifest
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| auths | object | “auths” defines the registry credentials, keyed by registry host without scheme. remark:
| |
| password | string | “password” defines the container registry password used for authentication. default:
credentials are retrieved from the local environment, such as remark:
| |
| token | string | “token” defines the container registry bearer token used for authentication. default:
credentials are retrieved from the local environment, such as remark:
| |
| username | string | “username” defines the container registry username used for authentication. default:
credentials are retrieved from the local environment, such as remark:
| |
| files | array | “files” defines the file name patterns the crawler searches for. The pattern syntax is: default: remark:
| |
| ignore | array | “ignore” defines rules to exclude matching policies from the autodiscovery. remark:
| |
| path | string | “path” defines an Updatecli compose file path pattern. remark:
| |
| policies | object | “policies” defines the policies to match, keyed by policy name. remark:
| |
| only | array | “only” defines rules to restrict the autodiscovery to matching policies. remark:
| |
| path | string | “path” defines an Updatecli compose file path pattern. remark:
| |
| policies | object | “policies” defines the policies to match, keyed by policy name. remark:
| |
| rootdir | string | “rootdir” defines the directory where the crawler starts searching for Updatecli compose files. default: the scm directory when “scmid” is set, otherwise the directory relative paths resolve from, by default the working directory. remark:
| |
| versionfilter | object | “versionfilter” defines the version filter used by the generated manifests. default: kind “semver” with pattern “*”, the latest version. remark:
example: | |
| kind | string | “kind” defines the versioning scheme used to select a version. default: latest remark:
example:
| |
| pattern | string | “pattern” defines the version pattern, according to “kind”. default:
remark:
example:
| |
| regex | string | “regex” defines the regular expression extracting the version from each entry. remark:
example:
| |
| replaceall | object | “replaceall” applies a regular expression replacement to each version before filtering. remark:
example: turns “curl-8_15_0” into “curl-8.15.0”. | |
| pattern | string | “pattern” defines the regular expression matching the text to replace. example:
| |
| replacement | string | “replacement” defines the text replacing each match of “pattern”. remark:
example:
| |
| strict | boolean | “strict” enforces strict semantic versioning rules when parsing versions. default: false remark:
|
Example
# updatecli.d/default.yaml
name: "Updatecli Autodiscovery"
scms:
default:
kind: git
spec:
url: https://github.com/updatecli/website.git
branch: master
autodiscovery:
scmid: default
crawlers:
updatecli:
versionfilter:
kind: semver
pattern: majoronly