> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-integration/use-harness-ci/use-harness-ci/build-and-upload-artifacts/upload-artifacts/upload-helm-chart.md).

# Upload Helm charts to container registries

Use a plugin to publish Helm charts to Docker registries

The [Helm Push plugin](https://github.com/harness-community/drone-push-helm-chart-docker-registry) streamlines the packaging and distribution of [Helm charts](https://helm.sh/docs/topics/charts/) to container registries.

For more information about why we created this plugin, go to the Harness blog post [Push Helm Charts to Container Registries with Harness CI](https://www.harness.io/blog/helm-container-registries-harness-ci). For more information about the Helm commands used by this plugin, go to the Helm documentation on [Using an OCI-based registry](https://helm.sh/docs/topics/registries/#using-an-oci-based-registry).

For general information about using plugins in CI pipelines, go to [Explore plugins](/continuous-integration/use-harness-ci/use-harness-ci/use-drone-plugins/explore-ci-plugins.md) and [Use Drone plugins](/continuous-integration/use-harness-ci/use-harness-ci/use-drone-plugins/run-a-drone-plugin-in-ci.md).

### Supported registries <a href="#supported-registries" id="supported-registries"></a>

Currently, this plugin supports pushing Helm charts to Docker Hub and Google Artifact Registry.

If you need to upload Helm charts to another to a Docker-compliant OCI registry that is not supported by this plugin, you can run the necessary `helm` commands in a [Run step](/continuous-integration/use-harness-ci/use-harness-ci/run-step-settings.md) or use the [Helm Push plugin](https://github.com/harness-community/drone-push-helm-chart-docker-registry) as a basis to [write your own plugin](/continuous-integration/use-harness-ci/use-harness-ci/use-drone-plugins/custom_plugins.md). For more information on the `helm` commands, go to the Helm documentation on [Using an OCI-based registry](https://helm.sh/docs/topics/registries/#using-an-oci-based-registry).

### Configure the Helm Push plugin <a href="#configure-the-helm-push-plugin" id="configure-the-helm-push-plugin"></a>

{% tabs %}
{% tab title="Upload Helm charts to GAR" %}
To use the Helm Push plugin to upload Helm charts to GAR, [add a Plugin step](/continuous-integration/use-harness-ci/use-harness-ci/use-drone-plugins/run-a-drone-plugin-in-ci.md) to your [CI pipeline](/continuous-integration/use-harness-ci/use-harness-ci/prep-ci-pipeline-components.md). For example:

```yaml
              - step:
                  type: Plugin
                  name: upload_helm_chart
                  identifier: upload_helm_chart
                  spec:
                    connectorRef: YOUR_IMAGE_REGISTRY_CONNECTOR
                    image: plugins/helm-push:ARCH_TAG
                    settings:
                      registry_url: LOCATION-docker.pkg.dev
                      registry_username: oauth2accesstoken
                      registry_password: <+secrets.getValue("access_token")>
                      chart_path: path/to/chart
                      gcloud_project_id: PROJECT_ID
                      registry_namespace: REPO_ID
```

To use the Helm Push plugin, configure the [Plugin step settings](/continuous-integration/use-harness-ci/use-harness-ci/use-drone-plugins/plugin-step-settings-reference.md) as follows:

| Keys                 | Type   | Description                                                                                                                                                                                                                                                                                     | Value example                                           |
| -------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| `connectorRef`       | String | Select a [Docker connector](/harness-ai/use-harness-platform/connectors/artifact-repositories/docker-registry-connector-settings-reference.md).                                                                                                                                                 | `YOUR_IMAGE_REGISTRY_CONNECTOR`                         |
| `image`              | String | Enter `plugins/helm-push:ARCH_TAG` and replace `ARCH_TAG` with the relevant architecture tag to use. For a list of available tags, go to the [Helm Push plugin README](https://github.com/harness-community/drone-helm-chart-container-registry?tab=readme-ov-file#plugin-image).               | `plugins/helm-push:linux-amd64`                         |
| `registry_url`       | String | Base URL for the Docker registry where the packaged chart will be published. For GAR, this must be `LOCATION-docker.pkg.dev`. Replace `LOCATION` with your GAR repository's regional or multi-regional [location](https://cloud.google.com/artifact-registry/docs/repositories/repo-locations). | `us-east4-docker.pkg.dev`                               |
| `registry_username`  | String | For GAR, this must be `oauth2accesstoken`                                                                                                                                                                                                                                                       | `oauth2accesstoken`                                     |
| `registry_password`  | String | Reference to a [Harness text secret](/harness-ai/use-harness-platform/secrets/add-use-text-secrets.md) containing your [GAR Helm access token](https://cloud.google.com/artifact-registry/docs/helm/authentication#token).                                                                      | `<+secrets.getValue("docker_chart_registry_password")>` |
| `chart_path`         | String | Path to the directory containing the Helm chart to upload, relative to the pipeline workspace. The default is `/harness` (the pipeline workspace root directory).                                                                                                                               | `charts` (navigates to `/harness/charts`)               |
| `gcloud_project_id`  | String | Your [Google Cloud project ID](https://cloud.google.com/artifact-registry/docs/helm/manage-charts#push)                                                                                                                                                                                         | `my-project`                                            |
| `registry_namespace` | String | Your [GAR repository name](https://cloud.google.com/artifact-registry/docs/helm/manage-charts#push) where you want to publish the chart.                                                                                                                                                        | `my-repo`                                               |
| {% endtab %}         |        |                                                                                                                                                                                                                                                                                                 |                                                         |

{% tab title="Upload Helm charts to Docker Hub" %}
To use the Helm Push plugin to upload Helm charts to Docker Hub, [add a Plugin step](/continuous-integration/use-harness-ci/use-harness-ci/use-drone-plugins/run-a-drone-plugin-in-ci.md) to your [CI pipeline](/continuous-integration/use-harness-ci/use-harness-ci/prep-ci-pipeline-components.md). For example:

```yaml
              - step:
                  type: Plugin
                  name: upload_helm_chart
                  identifier: upload_helm_chart
                  spec:
                    connectorRef: YOUR_IMAGE_REGISTRY_CONNECTOR
                    image: plugins/helm-push:ARCH_TAG
                    settings:
                      registry_url: registry.hub.docker.com
                      registry_username: DOCKER_USERNAME
                      registry_password: <secrets.getValue("docker_pat")>
                      chart_path: path/to/chart
                      registry_namespace: DOCKER_NAMESPACE
```

To use the Helm Push plugin, configure the [Plugin step settings](/continuous-integration/use-harness-ci/use-harness-ci/use-drone-plugins/plugin-step-settings-reference.md) as follows:

| Keys                 | Type   | Description                                                                                                                                                                                                                                                                            | Value example                             |
| -------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| `connectorRef`       | String | Select a [Docker connector](/harness-ai/use-harness-platform/connectors/artifact-repositories/docker-registry-connector-settings-reference.md).                                                                                                                                        | `YOUR_IMAGE_REGISTRY_CONNECTOR`           |
| `image`              | String | Enter `plugins/helm-push:ARCH_TAG` and replace `ARCH_TAG` with the relevant architecture tag to use. For a list of available tags, go to the [Helm Push plugin README](https://github.com/harness-community/drone-helm-chart-container-registry?tab=readme-ov-file#plugin-image).      | `plugins/helm-push:linux-amd64`           |
| `registry_url`       | String | Base URL for the Docker registry where the packaged chart will be published. For Docker Hub, this must be `registry.hub.docker.com`                                                                                                                                                    | `registry.hub.docker.com`                 |
| `registry_username`  | String | Username to access your Docker Hub registry                                                                                                                                                                                                                                            | `hubuser`                                 |
| `registry_password`  | String | Reference to a [Harness text secret](/harness-ai/use-harness-platform/secrets/add-use-text-secrets.md) containing a Docker Hub personal access token.                                                                                                                                  | `<+secrets.getValue("docker_pat")>`       |
| `chart_path`         | String | Path to the directory containing the Helm chart to upload, relative to the pipeline workspace. The default is `/harness` (the pipeline workspace root directory).                                                                                                                      | `charts` (navigates to `/harness/charts`) |
| `registry_namespace` | String | The Docker namespace where you want to publish the Helm chart, such as your personal namespace or an org namespace. For more information, go to the Docker documentation on [Pushing a Helm chart to Docker Hub](https://docs.docker.com/docker-hub/oci-artifacts/#push-a-helm-chart). | `myorg`                                   |
| {% endtab %}         |        |                                                                                                                                                                                                                                                                                        |                                           |
| {% endtabs %}        |        |                                                                                                                                                                                                                                                                                        |                                           |

{% hint style="info" %}
You can use variable expressions for plugin settings. For example, `registry_username: <+stage.variables.docker_user_name>` references a [stage variable](/harness-ai/use-harness-platform/pipelines/add-a-stage.md#stage-variables) called `DOCKER_USER_NAME`.
{% endhint %}

### Build logs and artifact files <a href="#build-logs-and-artifact-files" id="build-logs-and-artifact-files"></a>

When you run the pipeline, you can observe the step logs on the [build details page](/continuous-integration/use-harness-ci/use-harness-ci/viewing-builds.md) and then find the Helm chart in your container registry.

Optionally, you can use the [Artifact Metadata Publisher plugin](https://github.com/drone-plugins/artifact-metadata-publisher) to publish artifact URLs on the [Artifacts tab](/continuous-integration/use-harness-ci/use-harness-ci/viewing-builds.md). This makes it easier to find artifacts associated with specific builds.

{% @harness-feedback/feedback %}
