Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.
IntegrationHarness PlatformWorkflow

Harness CD

Deploy artifacts stored in Harness Artifacts directly from Harness CD pipelines without configuring external connectors or credentials.

Harness Continuous Delivery (CD) integrates natively with Harness Artifacts, so you can deploy stored artifacts without creating a connector or entering credentials. When you select Harness Artifacts as the artifact source in a CD service, the pipeline authenticates automatically and pulls the specified artifact version during execution.

This page covers configuring a CD service to use artifacts from Harness Artifacts, the supported artifact formats, and referencing Harness Artifacts images in containerized step group Run steps.


How it works

The integration follows a streamlined workflow:

  1. Configure the artifact source. In your CD service definition, select Harness Artifacts as the artifact source type. Specify the registry, repository format, and image or package details.

  2. No connector required. Unlike external registries, Harness Artifacts does not need a Docker connector or stored credentials. The pipeline authenticates as the identity that runs it.

  3. Automatic artifact resolution. During pipeline execution, Harness authenticates with the registry, pulls the specified artifact version, and deploys it to the target environment.


Before you begin

  • Harness account with Artifacts and CD enabled. You need artifacts already stored in a Harness Artifacts registry. To create a registry, go to Create a registry.

  • Harness Artifacts license. Your account needs a valid HAR license.

  • CD pipeline with a deploy stage. To learn about CD fundamentals, go to the Harness CD documentation.

  • Kubernetes Cluster connector (only for the containerized step group flow). To add a Kubernetes Cluster connector, go to Add a Kubernetes Cluster connector.


Supported artifact formats

The following artifact formats are supported as CD artifact sources from Harness Artifacts:

  • Docker: Container images for Kubernetes, AWS Lambda, Tanzu, serverless, and custom deployments.

  • Generic: Binary files and archives for SSH, WinRM, and custom deployments.

  • npm: Node.js packages for SSH, WinRM, and custom deployments.

  • NuGet: .NET packages for SSH, WinRM, and custom deployments.

  • Maven: Java artifacts for SSH, WinRM, and custom deployments.

  • Raw: Raw files for WinRM deployments only.

The Raw repository format is supported as an artifact source only for WinRM deployment types.

Harness Artifacts works with all major CD deployment swimlanes. To view the complete list of supported swimlanes and artifact types, go to CD integrations.


Configure a CD service with Harness Artifacts

You can configure the artifact source through the Harness UI or YAML.

1

Create or open a service

In your project, go to Deployments > Services. Select New Service or open an existing service.

2

Set the deployment type

In Service Definition, select the deployment type (for example, Kubernetes).

3

Add an artifact source

In the Artifacts section, select Add Artifact Source. In Specify Artifact Repository Type, select Artifact Registry and select Continue.

4

Configure artifact details

Fill in the following fields:

  • Artifact Source Identifier: A name that identifies this artifact source.

  • Repository Format: The artifact format (for example, docker).

  • Registry: The Harness Artifacts registry where your images or packages are stored.

  • Image Path (for Docker) or the equivalent field for your format: The artifact name.

  • Tag: The version tag, or use a runtime input (<+input>) to select at deployment time.

  • Digest (optional): A specific image digest for immutable deployments.

5

Save the configuration

Select Submit. The artifact source is added to the service definition.

If you use a runtime input for Tag, Harness pulls the list of available tags from the registry at deployment time and prompts you to select one.

If an image with the specified tag and digest combination does not exist in the registry, the pipeline fails at execution time.

The following YAML defines a Kubernetes service that uses a Docker image from Harness Artifacts:

Field
Description

type: Har

Identifies Harness Artifacts as the artifact source type.

registryRef

The identifier of the target registry in Harness Artifacts.

type: docker

The repository format. Supported values: docker, generic, npm, nuget, maven, raw.

imagePath

The name of the image or package in the registry.

tag

The version tag. Use <+input> for runtime selection.

digest

(Optional) An image digest for immutable deployments.


Referencing Harness Artifacts images in containerized step group Run steps

You can reference container images from Harness Artifacts in CD Run steps that execute inside a containerized step group. This is useful when your deployment pipeline needs a custom tool image for scripting or validation tasks.

1

Add a step group

In your CD pipeline stage, go to Execution and add a Step Group.

2

Enable container-based execution

In the step group configuration, enable Container based execution. In Kubernetes Cluster, select a Harness Kubernetes Cluster connector for the cluster where the step containers run.

3

Add a Run step

Inside the step group, select Add Step and add a Run step.

4

Select Harness Artifacts

In the Run step, set Registry Type to Artifact Registry. In Container Registry, select the registry that hosts the image. In Image, enter the image reference (for example, my-tools:2.1.0).

5

Configure and save

Add your run command and select Apply Changes.

Select Third-Party Artifact Registry instead when you want to pull the image from an external Docker registry through a Harness Docker connector.


Permissions

To use Harness Artifacts as an artifact source in CD pipelines:

  • Your account needs a valid Harness Artifacts license.

  • The pipeline identity needs appropriate RBAC permissions to access the target registry.

  • No connector or username is required. The pipeline authenticates as the identity that runs it.

To configure RBAC, go to RBAC and permissions.


Troubleshooting

The artifact source does not list any registries

Verify that your account has a valid Harness Artifacts license and that registries exist in the current project scope. If registries are in a different organization or project, verify that the pipeline identity has cross-project access.

The pipeline fails with an artifact-not-found error

Verify that the tag or digest specified in the artifact source exists in the registry. If you use a runtime input for the tag, confirm that the selected tag is still available. Open the registry in the Harness UI and check that the artifact is listed.

A Run step in a containerized step group cannot pull the image

Verify that the Kubernetes Cluster connector is configured correctly and that the cluster has network access to pkg.harness.io. Also confirm that the pipeline identity has read access to the registry.


Next steps

Last updated

Was this helpful?