Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Indentation problem not caught by bitbucket-pipelines.yml json schema

Dylan Landry July 30, 2025

 

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.

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 1, 2025

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

Dylan Landry August 5, 2025

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.

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 5, 2025

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events