I had a deployment fail recently because I incorrectly indented a part of the bitbucket-pipelines.yml file. My question is why did the bitbucket-pipeline.yml json schema not catch the error?
Here's a link to the bitbucket-pipelines.yml json schema.
Here's our pipeline file with the incorrect indentation. The "services" part should be indented one more time so it gets structured as a property of the step object.
definitions:
steps:
- step: &build-docker-image
services:
- docker
Here's the correct indentation:
definitions:
steps:
- step: &build-docker-image
services:
- docker
I tried to troubleshoot this myself:
- Correct `services` property path: `definitions.steps[0].step.services`
- Incorrect `services` property path: `definitions.steps[0].services`
I can see in the bitbucket-pipelines.yml json schema that `step_base` does have a `services` property, so I can see how the correct path above works.
But I can't find the relevant schema for the elements in `definitions.steps`. I would want to look there to see why `definitions.steps[0].services` is being marked as valid by the json schema.