Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×
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:
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.
Hey @Dylan Landry
I can't seem to understand the situation here, as the community doesn't do much justice to the code formatting. Could you raise a support ticket with us so we can review it?
Please share the failed deployment URL in the ticket to help our Support engineer investigate.
Thanks!
Regards,
Syahrul
Hi Syahrul,
Sorry for the confusion. I've rewritten the post to hopefully be more clear. I've also formatted the code a little better. Let me know if that makes it easier to understand.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dylan,
Thanks for the update. I believe this is expected because the Bitbucket Pipelines JSON schema doesn't strictly enforce where properties should be within definitions.steps, so properties like services that are misplaced won't be flagged as errors.
That said, I will raise this internally to enforce stricter properties, enabling more accurate flagging of misplaced properties.
Thank you for bringing this up!
Regards,
Syahrul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.