Skip to main content

Fixed values, runtime inputs, and expressions

For most settings in Harness pipelines, you can use fixed values, runtime inputs, or expressions. These options are also sometimes available for other entities, such as connectors and triggers.

When writing pipelines in YAML, enter the value using the appropriate syntax. For example:

  • For fixed values, enter the value directly.
  • For runtime input, enter <+input>.
  • For expressions, enter the expression, such as <+secrets.getValue("somesecret")>.

When you type <+, Harness provides suggestions for built-in expressions as you type.

Fixed values

Fixed Values are values that you define when you configure a setting. These values don't change at runtime.

Use fixed values for settings you don't need to change based on the build context, other steps, or runtime operations. For example, you could use a fixed value for your pipeline's codebase configuration so that the pipeline always uses the same code repo connector and branch.

Runtime inputs

Runtime input provides a placeholder with the expectation that you'll define this value at runtime. For example, if you set the Kubernetes cluster Namespace setting to runtime input (<+input>), you'll need to provide the Namespace value when you run the pipeline.

You can customize runtime inputs to have specific allowed values, default values, multi-selection, and more.

For more information, go to Use runtime input.

Expressions

Use Harness expressions to reference input, output, and execution variables. These variables represent settings, metadata, and other values that exist in the pipeline before and during execution. These can include environment variables, secrets, entity identifiers, user-defined variables, and more.

At pipeline runtime, Harness replaces the expression with the resolved value.

When writing pipelines in YAML, enter the expression using the appropriate syntax.

When you type <+, Harness provides suggestions for built-in expressions as you type. You can manually trigger the suggestions by placing your cursor after <+ and pressing ctrl + space. These suggestions don't represent all possible expressions.

You can continue typing or select the expression from the list of suggestions.

For more information, go to: