Harness CI
Build, upload, and reference artifacts in Harness Artifacts directly from Harness CI pipelines without configuring external connectors.
Harness CI integrates natively with Harness Artifacts, so you can build, upload, and reference artifacts without configuring a Docker connector or managing external credentials. Harness Artifacts is the default registry type in CI steps, and the pipeline identity handles authentication automatically.
This page covers three built-in integration points: building and pushing Docker images, uploading artifacts of any supported package type, and referencing Harness Artifacts images in Run and Plugin steps.
How it works
Harness CI provides native steps that connect to Harness Artifacts directly within the platform:
Build and Push to Docker Registry. Build a Docker image and push it to a registry in Harness Artifacts. The step selects Harness Artifacts as the default registry type, so no Docker connector is needed.
Upload Artifacts to Harness Artifacts. Upload build outputs of any supported package type (Maven, npm, Python, Go, Conda, Generic, and others) to a registry. This dedicated step uses the Harness CLI internally.
Run and Plugin steps. Reference container images stored in Harness Artifacts as the execution environment for Run and Plugin steps, without an external Docker connector.
In all three cases, the pipeline authenticates as the identity that runs it. That identity needs the appropriate access to the target registry.
Before you begin
Harness account with Artifacts and CI enabled. You need at least one registry created in Harness Artifacts. To create one, go to Create a registry.
Pipeline identity with registry access. The identity that runs the pipeline needs write access (for build and upload steps) or read access (for Run and Plugin steps) to the target registry. To understand authentication, go to Authentication and identity tokens.
A CI pipeline with a Build stage. To learn about CI pipeline fundamentals, go to the Harness CI documentation.
Building and pushing Docker images
The Build and Push an image to Docker Registry step connects to Harness Artifacts directly. You select a registry and image name from the Harness UI, with no Docker connector and no credentials file required.
Uploading artifacts
The Upload Artifacts to Harness Artifacts step supports multiple package types and eliminates the need for external connectors or scripting. This step uses the Harness CLI internally to handle authentication and upload.
Configure the source path
In Source Path, enter the path to the artifact generated by a previous step. This path typically references build output, such as:
/harness/target/*.jarfor Maven artifacts/harness/example.tar.gzfor npm tarballs/harness/build/for Python wheels
You can use Harness expressions to reference outputs from earlier steps (for example, <+steps.build.output.outputVariables.ARTIFACT_PATH>).
Referencing Harness Artifacts images in Run and Plugin steps
You can use container images stored in Harness Artifacts as the execution environment for CI Run and Plugin steps. This is useful when your build steps need a specific runtime image hosted in your private registry.
Run the pipeline to verify the step pulls the image from Harness Artifacts and executes successfully.
Troubleshooting
Next steps
To push artifacts from external CI tools, go to GitHub Actions and Harness Artifacts or Jenkins and Harness Artifacts.
To deploy artifacts from Harness Artifacts in CD pipelines, go to Harness CD and Harness Artifacts.
To configure client-side authentication for specific package types, go to the relevant page under Setup.
To manage registries and artifacts from the CLI, go to CLI reference.
Last updated
Was this helpful?