ParamSpec
Defines a parameter declaration in a Task or Pipeline.Name by which the parameter is referenced.Must be a valid identifier (alphanumeric with hyphens and underscores).
Type of the parameter.Values:
string- Single string valuearray- Array of stringsobject- Key-value pairs
Human-readable description of the parameter.
Default value if not supplied at runtime.If default is set, the parameter becomes optional.
For object-type parameters, defines the structure of allowed keys.
List of allowed values for string parameters.Requires the
enable-param-enum feature flag.Param
Provides a value for a parameter.Name of the parameter being set.
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: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
- Always provide descriptions - Help users understand parameter purpose
- Use meaningful names - Choose clear, descriptive parameter names
- Set sensible defaults - Make parameters optional when reasonable
- Use object params for related values - Group related configuration
- Validate in scripts - Add validation logic for parameter values
- Document expected formats - Specify format in description (e.g., URLs, versions)