Forums

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

Valid pipeline configuration throwing error in VS Code

Kevin Tolentino
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 3, 2025

Hello,

I've been trying to create reusable steps to reduce lines on my pipeline.yaml, but I've been encountering this error: Property name is not allowed.yaml-schema: Pipeline Items.

Specifically, I encounter the error if I attempt to override some values (e.g., name).

Here's how it would look

image: atlassian/default-image:3
definitions:
  steps:
    - step: &reuse-no-error
        name: Reusable step
        script:
          - echo "Hello World"
    - step: &reuse-has-error
        name: Reusable step # Property script is not allowed.yaml-schema: Pipeline Items
        script: # Property script is not allowed.yaml-schema: Pipeline Items
          - echo "Hello World"
pipelines:
  branches:
    test:
      - step: *reuse-no-error
      - step: # happens even if I replace this "- step:" with "- <<:" directly
        <<: *reuse-has-error
        name: Change name

According to the validator (https://bitbucket.org/product/pipelines/validator), this is valid.

Edit: To add, I've committed the change but was told by bitbucket that there was an error in the pipelines.branches.test.0 as well. I'll try to replicate the issue and update this post shortly.

Edit2: The above yaml file causes the error: There is an error in your bitbucket-pipelines.yml at [pipelines > branches > test > 1]. Step is empty, null, or missing.

RESOLVED: Apologies, the references I was following had misaligned the step and << lines. After adding an indent to the << line, things worked as expected.

 

Cheers,

Kevin

1 answer

0 votes
Brant Schroeder
Community Champion
September 14, 2025

@Kevin Tolentino welcome to the Atlassian community 

In the future if you can post the solution in the answers and accept it then others will be able to more easily find it.  I posted it below if you can accept this answer.

RESOLVED: Apologies, the references I was following had misaligned the step and << lines. After adding an indent to the << line, things worked as expected.

 

 

Suggest an answer

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

Atlassian Community Events