-
Type:
Suggestion
-
Resolution: Unresolved
-
Component/s: API Framework - Schema
-
None
The published Bitbucket Pipelines configuration schema at: https://api.bitbucket.org/schemas/pipelines-configuration
does not currently model the new Dynamic Step Conditions feature. As a result, valid pipeline configurations using condition.state are flagged as invalid by schema-based tooling.
Current behavior
In the public schema, a condition is defined only with changesets:
"condition": { "type": "object", "properties": { "changesets": { "title": "Changeset Condition", "type": "object", "description": "Condition on the changesets involved in the pipeline.", "maxProperties": 1, "additionalProperties": false, "properties": { "includePaths": { ... }, "excludePaths": { ... } } } }, "required": ["changesets"] }
This implies:
condition must have changesets
No other properties (like state) are allowed under condition
However, Dynamic Step Conditions allow configurations like:
- step:
name: "conditional step"
condition:
state: MY_PIPELINE_VAR == "my_value"
script:
- echo "runs only when MY_PIPELINE_VAR == my_value"
This config works at runtime, but fails validation when checked against https://api.bitbucket.org/schemas/pipelines-configuration.