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

What's new in Harness CI 3.0

Understand the CI 3.0 changes to pipeline authoring, codebase configuration, and stage runtime settings

Harness CI 3.0 updates how you configure and author CI pipelines. You can continue to add steps to run commands, test code, build and push images, upload artifacts, and reuse cached data.

This page focuses on changes to your workflow and YAML configuration.


Codebase configuration at pipeline and stage levels

Define a default codebase with pipeline-level clone settings. Individual stages can inherit those settings, override the repository or ref, or disable the implicit clone. This lets you use different repositories in different stages without duplicating every clone setting.

Add an explicit Git Clone step when you need another repository or need to clone at a particular point in the step sequence. Choose the step for Harness Code or for an external Git provider. Provider-specific connector setup is documented in the Platform section.

Go to Configure codebases to plan your repository setup.


V1 pipeline YAML

CI 3.0 uses V1 YAML. Stages contain a steps list, commands use run.script, and inline step groups use group.steps. Step groups remain a way to organize related steps; the YAML structure changes, not the purpose of the feature.

This example runs a command on Harness Cloud without cloning a repository:

pipeline:
  id: ci_example
  name: CI example
  clone:
    enabled: false
  stages:
    - id: build
      name: Build
      runtime: cloud
      steps:
        - group:
            id: checks
            name: Checks
            steps:
              - id: hello
                name: Hello
                run:
                  script: echo "CI 3.0"

Use the YAML example in each step guide for that step's configuration. Do not copy an NG pipeline example unchanged into a V1 pipeline.

For more information on pipelines, stages, steps, and step groups, see Key concepts.


Stage runtime configuration

Configure where a stage runs through its runtime settings. For example, runtime: cloud selects Harness Cloud; a Kubernetes runtime includes its connector and namespace. Configure the operating system and architecture through the stage's platform settings where supported.

Your infrastructure choice determines the execution environment, network access, and prerequisites. Go to Set up build infrastructure to select an environment for your builds.


Inputs and expressions

V1 YAML supports declared inputs referenced with ${{ inputs.<name> }}. Harness <+...> expressions also appear in supported fields, for example, to select a branch from a Git trigger. Use the syntax documented for the field and expression context; do not mechanically replace all <+...> expressions.

For more information on inputs and expressions in your CI workflow, see CI pipeline creation overview.


Next steps

Last updated

Was this helpful?