Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,671
Community Members
 
Community Events
165
Community Groups

Error saying my pipeline has a step section empty or null

I keep receiving this error message:

There is an error in your bitbucket-pipelines.yml at [pipelines > branches > fixing-yaml > 0 > parallel > 4]. To be precise: The step section is empty or null.

It doesn't make any sense to me, I have nothing empty. even Atlassian's validator online says it's all good.

Also, the pipeline works fine, until I add another step, and it shows that.

clone:
depth: full

definitions:
caches:
sonar: ~/.sonar

steps:
- step: &lint
name: Lint
script:
- echo "Add linting here"

- step: &aws
name: AWS oidc setup
image: amazon/aws-cli
oidc: true
script:
- export AWS_REGION=us-east-1
- yum update
- yum install -y jq

- step: &sonarqube
name: SAST - SonarQube
runs-on:
- self.hosted
- linux
script:
- pipe: sonarsource/sonarqube-scan:1.0.0
variables:
SONAR_HOST_URL: ${SONAR_HOST_URL}
SONAR_TOKEN: ${SONAR_TOKEN}

-
step: &unit-test
name: Unit Test
script:
- echo "Add Unit Tests here"

-
step: &build
name: Build
script:
- ./cicd/build.sh
services:
- docker
caches:
- docker

- step: &deliver
name: Deliver
script:
- ./cicd/promote.sh

pipelines:
default: # Runs on every commit for branches not defined elsewhere
# - step: *sonarqube
- parallel:
- step: *lint
- step: *unit-test
- step: *build

pull-requests:
'**': # this runs as default for any branch not elsewhere defined
# - step: *sonarqube
- parallel:
- step: *lint
- step: *unit-test
- step: *build

branches: # these will run on every push of the branch
master:
# - step: *sonarqube
- parallel:
- step: *lint
- step: *aws
- step: *unit-test
- step: *build
- step: *deliver
This code results in that error:
There is an error in your bitbucket-pipelines.yml at [pipelines > branches > fixing-yaml > 0 > parallel > 4]. To be precise: The step section is empty or null.
But, if I simply remove the last step, leaving as:
...

...

branches: # these will run on every push of the branch
master:
# - step: *sonarqube
- parallel:
- step: *lint
- step: *aws
- step: *unit-test
- step: *build
It works fine. I can't make sense of it. Any help or suggestions?

1 answer

1 accepted

0 votes
Answer accepted

Nevermind.. Found my error... I had a few spaces missing.. indentation. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,245 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you