Use Helm with JFrog CLI
Configure jf helm to package and push Helm charts to JFrog Artifactory with build-info.
Run native Helm commands with build-info collection support.
When to Use
Use jf helm to package, push, and manage Helm charts with Artifactory as your chart registry. This integrates Helm operations with JFrog build-info for traceability and security scanning.
This topic covers the following tasks:
Package Alias (Ghost Frog)
Package Alias does not intercept
helmcommands. Supported tools aremvn,gradle,npm,yarn,pnpm,go,pip,pipenv,poetry,dotnet,nuget,docker,gem, andbundle. See Use JFrog CLI Package Alias for setup and the full tool list.
Package manager version compatibility
Before you begin, review Supported Package Manager Versions for the Helm versions supported and tested with JFrog CLI.
Prerequisites
- Helm 3.8 or later is required. Helm 3.8+ is required for OCI registry support. Helm 4.x has not been formally validated.
- Configure a server with
jf config addorjf c add. - Authentication to Artifactory is required.
Build: jf helm
Run native Helm commands with build-info collection support.
To run Helm commands with Artifactory integration:
- Ensure Helm 3.8+ and a configured JFrog server are available (see Prerequisites).
- Run
jf helmwith the Helm subcommand and arguments, adding--build-nameand--build-numberwhen supported and needed (see Build Examples).
Synopsis
jf helm <helm-arguments> [options]
Aliases: none
Arguments
| Argument | Required | Description |
|---|---|---|
<helm-arguments> | Yes | Helm command and arguments (for example, package, push, dependency update) |
Supported Subcommands
All standard Helm commands are supported through jf helm. The following subcommands collect build-info when --build-name and --build-number are provided:
| Subcommand | Description |
|---|---|
registry login | Log in to an OCI-compatible Helm chart registry. |
package | Package a chart directory into a chart archive. |
push | Push a chart to an OCI-compatible registry. |
pull | Download a chart from a repository. |
dependency update | Update chart dependencies from Chart.yaml. |
install | Install a chart into a Kubernetes cluster. |
upgrade | Upgrade a release to a new chart version. |
repo | Manage chart repositories. |
Any Helm command not listed above is passed through to the native Helm client.
Build Options
| Flag | Default | Description |
|---|---|---|
--build-name | — | Build name for build-info. Requires --build-number. |
--build-number | — | Build number for build-info. Requires --build-name. |
--module | — | Optional module name for build-info. Requires --build-name and --build-number. |
--password | — | JFrog password |
--project | — | JFrog Artifactory project key |
--repository-cache | — | Path to the Helm repository cache directory. |
--server-id | — | Server ID configured using jf config add |
--username | — | Artifactory username |
Build Examples
View Help
jf helm --helpPackage a Chart with Build-Info
Prerequisite
Build-info collection requires a
Chart.lockfile in the chart directory.Chart.lockis generated when a chart has declared dependencies and you runhelm dependency update. Charts with no dependencies do not produce aChart.lockand build-info collection will fail. If your chart has no dependencies, see the end-to-end example below.
jf helm package ./mychart --build-name=<build-name> --build-number=<build-number>Where:
./mychartis the path to the chart directory (must containChart.lock)<build-name>is a name for the build (for example,helm-charts)<build-number>is a number or identifier for the build run (for example,1)
For example:
jf helm package ./mychart --build-name=helm-charts --build-number=1Expected output:
[Info] Running Helm package ./mychart
Successfully packaged chart and saved it to: ./mychart-0.1.0.tgz
[Info] Collecting build info for executed helm package command
End-to-End Example: Package with Dependency
To use jf helm package with build-info on a chart that has dependencies, first declare a dependency in Chart.yaml, then run helm dependency update to generate Chart.lock, and finally package with jf helm:
Step 1 — Declare a dependency in Chart.yaml:
dependencies:
- name: nginx
version: "18.x.x"
repository: "https://charts.bitnami.com/bitnami"Step 2 — Update dependencies (generates Chart.lock):
helm dependency update ./mychartStep 3 — Package with build-info:
jf helm package ./mychart --build-name=helm-charts --build-number=1Push a Chart to OCI Registry
jf helm push mychart-0.1.0.tgz oci://<repo-host>/helm-local --build-name=<build-name> --build-number=<build-number>Where:
<repo-host>is your Artifactory hostname (for example,acme.jfrog.io)
For example:
jf helm push mychart-0.1.0.tgz oci://acme.jfrog.io/helm-local --build-name=helm-charts --build-number=1Update Chart Dependencies with Build-Info
Note
Build-info collection for
dependency updaterequires thatChart.lockalready exists from a prior run. On the very first run against a new chart,Chart.lockdoes not yet exist and build-info collection will fail with exit code 1 even though the dependencies are downloaded successfully. Runhelm dependency update ./mychartonce natively to generateChart.lock, then usejf helm dependency updatefor subsequent runs.
jf helm dependency update ./mychart --build-name=<build-name> --build-number=<build-number>Expected output (after Chart.lock exists):
[Info] Running Helm dependency update ./mychart
[Info] Collecting build info for executed helm dependency command
Helm Registry Login
To log in to an Artifactory Helm OCI registry:
- Ensure a server is configured with
jf config add(see Prerequisites). - Run
jf helm registry loginwith your registry URL and optional--server-id,--username, or--password(see the examples later in this section).
Synopsis
jf helm registry login <registry-url> [--server-id <id>] [--username <name>] [--password <pwd>]
Logs your local Helm client into an OCI-compatible registry (such as JFrog Artifactory) using credentials managed by JFrog CLI. After a successful login, you can run jf helm push, jf helm pull, and other OCI operations without re-authenticating each time.
Container registries such as Helm OCI repositories require a login before you can perform push and pull operations. This applies to both local development and CI/CD pipelines (for example, Azure DevOps, GitHub Actions).
Arguments
| Argument | Required | Description |
|---|---|---|
registry-url | Yes | The OCI registry to log into (for example, mycompany.jfrog.io) |
Options
| Flag | Default | Description |
|---|---|---|
--server-id | — | Use a specific configured server |
--username | — | Registry username |
--password | — | Registry password or access token |
When --username and --password are omitted, JFrog CLI uses credentials from the configured server (set via jf config add). This requires the server to be configured with a JWT access token. If your server uses a reference (opaque) token, login will fail with no credentials available for helm registry login. In that case, provide --username explicitly:
jf helm registry login mycompany.jfrog.io --server-id my-jfrog --username <USERNAME>To check whether your configured server uses a JWT or reference token, run jf config show.
Note
registry logindoes not appear in thejf helm --helpSupported Commands list but is a fully supported subcommand.
Examples
# Login using configured server credentials
jf helm registry login mycompany.jfrog.io
# Login using a specific server configuration
jf helm registry login mycompany.jfrog.io --server-id my-jfrog
# Login with explicit credentials
jf helm registry login mycompany.jfrog.io --username <USERNAME> --password <PASSWORD>Important Notes
- No separate config command: Unlike other build tools, Helm does not have a
jf helm-configcommand. Authentication is handled via--server-idor the active server configuration. - OCI registries: For OCI-based Helm registries (Helm 3.8+), use the
oci://prefix in push/pull commands. - Build-info: Use
--build-nameand--build-numberto collect chart info, then publish withjf rt build-publish. - Module type: Build-info for Helm charts uses module type
helm, including charts in Helm OCI repositories. Do not useHelmOCI,helmoci, ordocker. - Chart dependencies:
jf helm dependency updateresolves chart dependencies from Artifactory's Helm repositories.
Build-info module type and REST API publishing
When you publish build-info with jf rt build-publish, each module includes "type": "helm". This applies to:
jf helm package— collects chart dependencies fromChart.lockjf helm push— adds OCI artifacts (manifest.jsonandsha256__*layer files) and attachesbuild.name/build.numberproperties to the chart folder in Artifactory
If you push charts with the native helm client and publish build-info manually through the REST API, you must:
- Set
build.name,build.number, and optionallybuild.timestampproperties on the chart version folder using the Set Item Properties REST API - Use module type
helmin your build-info JSON - Include artifact checksums and paths that match the stored OCI files
Without step 1, artifacts appear in the Builds UI with No path found (externally resolved or deleted/overwritten).
For a complete Helm OCI build-info JSON example and the full list of valid module types, see Build Upload REST API.
CI/CD Example: GitHub Actions
# .github/workflows/build.yml
steps:
- uses: actions/checkout@v4
- name: Setup JFrog CLI
uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: ${{ vars.JF_URL }}
JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
- name: Package Helm chart
run: jf helm package ./mychart --build-name=helm-charts --build-number=${{ github.run_number }}
- name: Push Helm chart
run: jf helm push mychart-0.1.0.tgz oci://acme.jfrog.io/helm-local --build-name=helm-charts --build-number=${{ github.run_number }}
- name: Publish build info
run: jf rt build-publish helm-charts ${{ github.run_number }}CI/CD Example: Azure DevOps
# azure-pipelines.yml
steps:
- task: JfrogCliV2@1
inputs:
jfrogPlatformConnection: 'JFrog Platform V2'
command: |
jf helm registry login mycompany.jfrog.io
jf helm package ./mychart --build-name=$(Build.DefinitionName) --build-number=$(Build.BuildNumber)
jf helm push mychart-0.1.0.tgz oci://mycompany.jfrog.io/helm-local --build-name=$(Build.DefinitionName) --build-number=$(Build.BuildNumber)
jf rt build-publish $(Build.DefinitionName) $(Build.BuildNumber)Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| 401 / 403 on push or pull | Not logged into OCI registry or invalid credentials | Run jf helm registry login <registry-url> before push/pull. Re-run jf config add if credentials are stale |
| OCI push fails | Helm version does not support OCI | Upgrade to Helm 3.8+ for OCI registry support |
jf helm push target not found | Missing oci:// prefix for OCI registries | Use oci://<registry-url>/<repo> format |
| Chart dependencies not resolved from Artifactory | Helm repo not added or not authenticated | Run helm repo add with Artifactory URL and credentials |
| Build-info not collected | --build-name and --build-number not passed | Add both flags to the Helm command |
[Error] failed to collect build info: failed to read Chart.lock | Chart.lock does not exist in the chart directory | Declare dependencies in Chart.yaml and run helm dependency update ./mychart to generate Chart.lock before using jf helm package or jf helm dependency update |
[Warn] couldn't extract payload from Access Token / no credentials available for helm registry login | Server configured with a reference (non-JWT) access token | Add --username <USERNAME> to the jf helm registry login command. Run jf config show to check your token type |
Enable debug logging: export JFROG_CLI_LOG_LEVEL=DEBUG
Frequently Asked Questions
This section provides answers to frequently asked questions about using Helm with JFrog CLI.
FAQs
Q: How do I package and push a Helm chart with build-info?
A: Run jf helm package and jf helm push with --build-name and --build-number, then publish with jf rt build-publish. See Build: jf helm.
Q: What do I need before pushing a Helm chart to Artifactory?
A: You need Helm 3.8 or later, a configured JFrog CLI server, and a login to the Artifactory Helm OCI registry. See Prerequisites and Helm Registry Login.
Q: Why does jf helm package fail to collect build-info?
A: Build-info collection requires a Chart.lock file, which only exists after you declare a dependency in Chart.yaml and run helm dependency update. Charts with no dependencies don't produce build-info. See Package a Chart with Build-Info.
Q: What is the difference between jf helm and jf helm registry login?
A: jf helm runs Helm subcommands such as package and push with optional build-info. jf helm registry login authenticates your local Helm client to an OCI-compatible registry before those push and pull operations. See Helm Registry Login.
Q: Can I use jf helm without a separate config command?
A: Yes. Unlike other build tools, Helm has no jf helm-config command. Authentication is handled through --server-id or the active server configuration. See Important Notes.
Q: What module type should I use for Helm OCI build-info?
A: Use helm. Helm OCI repositories store charts using an OCI layout, but the build-info module type is still helm, not HelmOCI or docker. See Build-info module type and REST API publishing.
Q: Why do my Helm OCI artifacts show "No path found" in the Builds UI?
A: The artifacts are missing build.name and build.number item properties. When you use jf helm push with --build-name and --build-number, JFrog CLI sets these automatically. For manual REST API workflows, attach the properties to the chart version folder before uploading build-info. See Build Upload REST API.
Related Topics
Updated about 1 month ago
