Skip to main content
Parameters allow you to pass values into Tasks and Pipelines at runtime.

ParamSpec

Defines a parameter declaration in a Task or Pipeline.
string
required
Name by which the parameter is referenced.Must be a valid identifier (alphanumeric with hyphens and underscores).
ParamType
default:"string"
Type of the parameter.Values:
  • string - Single string value
  • array - Array of strings
  • object - Key-value pairs
string
Human-readable description of the parameter.
ParamValue
Default value if not supplied at runtime.If default is set, the parameter becomes optional.
map[string]PropertySpec
For object-type parameters, defines the structure of allowed keys.
[]string
List of allowed values for string parameters.Requires the enable-param-enum feature flag.

Param

Provides a value for a parameter.
string
required
Name of the parameter being set.
ParamValue
required
The value to pass to the parameter.

ParamValue

A ParamValue can hold different types of values:

String Value

Array Value

Object Value

Variable Substitution

Parameters can be referenced using variable substitution syntax:

String Parameters

Array Parameters

Reference the entire array:
Reference individual elements:

Object Parameters

Access individual keys:

Parameter Propagation

Pipeline to Task

Pass Pipeline parameters to Tasks:

Using Task Results as Parameters

Pass task results to subsequent tasks:

Object Parameter Example

Array Parameter Example

Default Values

Parameters with defaults are optional:

Best Practices

  1. Always provide descriptions - Help users understand parameter purpose
  2. Use meaningful names - Choose clear, descriptive parameter names
  3. Set sensible defaults - Make parameters optional when reasonable
  4. Use object params for related values - Group related configuration
  5. Validate in scripts - Add validation logic for parameter values
  6. Document expected formats - Specify format in description (e.g., URLs, versions)