This utility helps to build and publish Helm charts to a raw Nexus repository.
It addresses issues with hosting helm charts on Nexus which currently doesn't support Helm repos.
# Install the utility
npm i -g helm-charts
# Builds all charts from the ./charts directory, places them in the ./charts-output directory and generates a repo index.
helm-charts build --source ./charts
# Publishes all charts from the ./charts-output directory to a raw Nexus repo available at https://some.nexus.example.com/repository/helm-raw/charts
helm-charts publish --repository https://some.nexus.example.com/repository/helm-raw/charts --username <REPO_USER> --password <REPO_PASS>
The chart publishing mechanism puts its best efforts to resolve possible charts versioning conflicts. When the chart that's about to be added already exists in the remote repo:
- it is skipped - when they both have the same content (sha256 checksum matches).
- an error is raised - when their content is different.
-
Install the utility in your project.
# Install the utility npm i --save-dev helm-charts
-
Put the following in your
package.json
:{ "scripts": { "helm-charts:build": "helm-charts build", "helm-charts:publish": "helm-charts publish --repository https://some.nexus.example.com/repository/helm-raw/charts" } }
-
Run it as follows:
npm run helm-charts:build npm run helm-charts:publish -- --username <REPO_USER> --password <REPO_PASS>