How chart version and image tags are determined#
Chartpress will infer chart versions and image tags using a few key pieces of information.
tag: If not directly set by--tag, it will be inferred from most recent commit that is tagged in the current branch (as determined bygit describe) or be set to 0.0.1 if no commit is tagged.If the
taghas a leadingvbut is otherwise a valid SemVer2 version, thevwill be stripped from Chart.yaml before its set as Helm 3 requires Helm chart versions to be SemVer2 compliant.
The latest commit modifying content in a relevant path since
tag.n: The number of commits since the latest tagged commit on the branch, as an integer.hash: The latest commit’s abbreviated hash, which is often 7-8 characters, prefixed withh.
If
tag(like0.10.0or0.10.0-beta.1) contains a-, atag.git.n.hashformat will be used, and otherwise atag-0.dev.git.n.hashformat will be used.If
--longis specified or not. If--longis specified, tagged commits will always be written out with the.git.n.hashpart appended to it, looking something like1.0.0-0.dev.git.0.habcd123
When producing a development version (with .git.n.hash on the end),
The base version can come from one of two places,
depending on your configuration.
See controlling-development-version for more info.
Examples chart versions and image tags#
This is a list of realistic chart versions and/or image tags in a chronological order that could come from using chartpress.
0.8.0
0.8.0-0.dev.git.4.hasdf123
0.8.0-0.dev.git.10.hsdfg234
0.9.0-beta.1
0.9.0-beta.1.git.12.hdfgh345
0.9.0-beta.1.git.15.hfghj456
0.9.0-beta.2
0.9.0-beta.2.git.20.hghjk567
0.9.0-beta.3
0.9.0