Helm Plugin for automatic versioning of helm charts
Provides simple semantic versioning based from previous git tags.
This allows you to run a single command and package the next version of your chart. This project allows you to combine your Dockerfile and Helm Chart in a single repository and automatically version the Helm chart on a build.
You can install a specific release version:
$ helm plugin install https://github.com/sstarcher/helm-release
Helm Release supports different release logic for difference sources
When using the --source helm
you must specify --bump
of major, minor, or patch.
To describe the release naming process we will use the following nomenclature.
git describe --tags
git describe --tags
git rev-parse --short HEAD
with the g
prefix removedgit rev-parse --abbrev-ref HEAD
0.
to ensure it’s the lowest versionThe default version for a branch is NEXT_TAG-0.BRANCH-COMMITS+SHA
When COMMITS is equal to 0 we assume the intent is to do a release of the current commit and the version will be the tag itself TAG+SHA
NOTE Tags should be annotated tags and not lightweight tags. Tags created in the Github UI will be lightweight tags by default.
The master branch is treated differently from the default and will be NEXT_TAG-COMMITS+SHA
Jenkins uses the environment variable BRANCH_NAME with the value of the PR example PR-97
. This will result in a release version of NEXT_TAG-0.pr-97-COMMITS+SHA
$ eval $(helm env) # Get helm environment variable for plugin location $HELM_PLUGINS
$ mkdir /Users/sstarcher/Library/helm/plugins/helm-release
$ tar -xvf DOWNLOADED_TAR_GZ -C /Users/sstarcher/Library/helm/plugins/helm-release
$ helm plugin remove release