2.1.0 • Published 2 months ago

@eshepelyuk/semantic-release-helm-oci v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

semantic-release-helm-oci

semantic-release plugin for publishing Helm charts to OCI compatible registries.

NPM semantic-release MIT License

StepDescription
verifyConditionsVerify plugin configuration and login to Helm registry.
preparePackage Helm chart to local folder.
publishPublish Helm chart to OCI registry.
chartPathChart directory, where the Chart.yaml is located.

Installation

npm i @eshepelyuk/semantic-release-helm-oci -D

Usage

The plugin can be configured in the semantic-release configuration file :

.releaserc.json

{
  "plugins": [
    ["@eshepelyuk/semantic-release-helm-oci", {
      "registry": "oci://ghcr.io/eshepelyuk/abc"
    }]
  ]
}

.releaserc.yaml

plugins:
  -
    - '@eshepelyuk/semantic-release-helm-oci'
    - registry: oci://ghcr.io/eshepelyuk/abc

With this example, for each release, a Helm chart will be published to oci://ghcr.io/eshepelyuk/abc/${CHART_NAME}:${CHART_VERSION}. Where ${CHART_NAME} is a name from Chart.yaml and ${CHART_VERSION} is a version detected by semantic-release.

version and appVersion in Chart.yaml

Plugin intentionally doesn't modify Chart.yaml during the release. It's recommended to use Git tags for maintaining release versions.

The plugin leverages --version and --app-version when calling helm package to manage published chart versions and not rely on Chart.yaml.

There's two usage scenarios for this plugin:

  1. The chart and the application are co-located in the same repository.

    In this case, the version and appVersion are both changed during a release. This is a default plugin's behaviour.

  2. The chart is maintained separately from the application.

    In this case appVersion is modified outside of chart's release process and must be updated manually in Chart.yaml. To prevent plugin from setting --app-version - use skipAppVersion option.

Configuration

Environment variables

Credentials for OCI registry authentication are passed through environment variables:

VariableDescription
REGISTRY_USERNAMERequired. OCI registry username.
REGISTRY_PASSWORDRequired. OCI registry password.

Options

OptionDescriptionTypeDefault
registryRequired. Registry URL with oci:// schema,e.g. oci://ghcr.io/eshepelyuk/abc.stringundefined
skipAppVersionUse appVersion from Chart.yaml when packaging chart, instead of using semantic-release nextVersionbooleanfalse
2.1.0

2 months ago

2.0.0

9 months ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago