Skip to main content
Parameters allow you to supply values at runtime to customize the execution of Tasks and Pipelines. Parameters provide flexibility and reusability for your Tekton resources.

Overview

Parameters enable you to:
  • Pass configuration values to Tasks and Pipelines
  • Customize execution without modifying resource definitions
  • Reuse Tasks and Pipelines with different inputs
  • Share data between Tasks in a Pipeline

Parameter Types

Tekton supports three parameter types:

String Parameters

The most common parameter type. If no type is specified, it defaults to string.

Array Parameters

Useful when the number of values varies, such as compilation flags or file lists.

Object Parameters

Useful for grouping related parameters together.
Object parameters must specify the properties section to define their schema.

Parameter Names

Parameter names must follow these rules:
  • Must only contain alphanumeric characters, hyphens (-), underscores (_), and dots (.)
  • Must begin with a letter or an underscore (_)
  • Are case insensitive (e.g., APPLE and apple are treated as the same)
Object parameter names and their key names cannot contain dots (.).

Using Parameter Names with Dots

If a parameter name contains dots, use bracket notation with quotes:

Parameters in Tasks

Defining Parameters in Tasks

Providing Parameters in TaskRuns

Parameters in Pipelines

Defining Parameters in Pipelines

Providing Parameters in PipelineRuns

Parameter Variable Substitution

Parameters can be referenced using variable substitution syntax:

String Parameters

Array Parameters

Object Parameters

You can only reference individual properties of object parameters, not the entire object (except when passing to another object parameter).

Default Values

Parameters can have default values that are used when no value is provided at runtime:
If a parameter does not have a default value, you must explicitly provide its value when creating a TaskRun or PipelineRun.

Parameter Propagation

When using embedded specs (taskSpec or pipelineSpec), parameters from the parent resource are automatically propagated to child resources:

Propagation Rules

  • Parameters are propagated only to embedded specs (taskSpec/pipelineSpec)
  • Parameters are not propagated to referenced resources (taskRef/pipelineRef)
  • Inner scopes take precedence over outer scopes when parameter names conflict
  • Runtime values take precedence over default values

Best Practices

1

Use Descriptive Names

Choose parameter names that clearly indicate their purpose:
2

Provide Descriptions

Always include descriptions to help users understand parameter usage:
3

Use Default Values

Provide sensible defaults when possible to make your resources easier to use:
4

Group Related Parameters

Use object parameters to group related configuration:

Complete Example