| `HELM_PACKAGE_ARGS` | The Helm [command with options](https://helm.sh/docs/helm/helm_package/) to perform the packaging (_without dynamic arguments such as the chart path_) | `package --dependency-update` |
| `HELM_PUBLISH_SNAPSHOT_ENABLED` | Set to `true` to enable publishing the snapshot (untested) chart during the packaging step | _none_ (disabled) |
| `HELM_SEMREL_RELEASE_DISABLED` | Set to `true` to disable usage of `semantic-release` release info for helm package (see next chapter) | _none_ (enabled) |
#### `semantic-release` integration
@@ -339,6 +340,22 @@ If no next version info is determined by `semantic-release`, the package will be
Note: You can disable the `semantic-release` integration described herebefore the `HELM_SEMREL_RELEASE_DISABLED` variable.
#### Chart version management
Depending on the branch and the step in the CI/CD pipeline, the chart will be packaged with a different version.
The general version format will be `<x.y.z>-<label>`:
* `<x.y.z>`:
* if [semantic-release integration](#semantic-release-integration) is enabled: uses the version determined by `semantic-release`,
* otherwise uses the version from the chart file
* `<label>`:
* on the production branch (`main` or `master` by default), no trailing label is used
* on any other branch, `$CI_COMMIT_REF_SLUG` is used as trailing label<br/>
_(ex: `review-feature-12` on branch `review/feature-12`)_
* :warning: when `HELM_PUBLISH_SNAPSHOT_ENABLED` is enabled, the chart is additionally packaged (and published) with a label suffixed with `snapshot`<br/>
_(ex: `snapshot` on production branch and `review-feature-12-snapshot` on branch `review/feature-12`)_
### `helm-publish` job
This job publishes the packaged chart to a [chart repository](https://helm.sh/docs/topics/chart_repository/) or [OCI-based registry](https://helm.sh/docs/topics/registries/). It uses the following variables:
@@ -349,8 +366,10 @@ This job publishes the packaged chart to a [chart repository](https://helm.sh/do
| `HELM_PUBLISH_URL` | The URL of the Helm repository to publish your Helm package.<br/>Supports both [chart repository](https://helm.sh/docs/topics/chart_repository/) or [OCI-based registry](https://helm.sh/docs/topics/registries/) (url must be prefixed with `oci://`) | `oci://$CI_REGISTRY/$CI_PROJECT_PATH/charts` ([GitLab's container registry](https://docs.gitlab.com/ee/user/packages/container_registry/)) |
| `HELM_PUBLISH_ON` | Defines on which branch(es) the publish job shall be enabled (`prod` to enable on production branch only, `protected` to enable on protected references and `all` to enable on all Git references) | `prod` |
| `HELM_CM_PUSH_PLUGIN_VERSION` | cm-push plugin version to install (only when using `push` method with a regular chart [repository](https://helm.sh/docs/topics/chart_repository/)) | _none_ (latest) |
#### Supported publish methods
The Helm publish supports several methods, configurable with the `$HELM_PUBLISH_URL` variable:
"description":"Defines on which branch(es) the publish job shall be enabled",
"default":"prod",
"type":"enum",
"values":["prod","protected","all"]
},
{
"name":"HELM_CM_PUSH_PLUGIN_VERSION",
"description":"cm-push plugin version to install (only when using `push` method with a regular chart [repository](https://helm.sh/docs/topics/chart_repository/)",