The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Shared Pipeline error

Rupak Kumar Rath
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!
March 13, 2025

I have only added below code on my pipeline

 

export: true
definitions:
  pipelines:
    share-pipeline-1:
      - step:
          name: "hello world"
          script:
            - echo hello world

 

After pushing the code am getting the below error

 

There is an error in your bitbucket-pipelines.yml at [(root level)]. The top-level "pipelines" section is missing, empty, or null.

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 17, 2025

Hi @Rupak Kumar Rath and welcome to the community!

Based on your definition, it looks like you are using the template for shared pipelines as per the following documentation:

The content of your bitbucket-pipelines.yml is used when you define pipelines that you want to reuse in other repos of the workspace (this feature is available for workspaces on the Premium plan).

What is missing is an additional pipelines section for this repository. If you don't want pipelines to run automatically for this repo at the moment, you can add a dummy custom pipeline as follows:

export: true
definitions:
pipelines:
share-pipeline-1:
- step:
name: "hello world"
script:
- echo hello world

pipelines:
custom:
custom-do-not-use:
- step:
script:
- echo "hello"

Since this is a custom pipeline, it will not get triggered automatically on every push.

If you do want to define pipelines that will run automatically on this repo, you can check our documentation here:

Please feel free to reach out if you have any questions!

Kind regards,
Theodora

0 votes
Aron Gombas _Midori_
Community Champion
March 14, 2025

The "pipelines:" line should not be indented! It should appear in the left-most position, meaning the top-level in YAML!

See the reference or this snippet:

Cache-service-container-and-export-pipelines-definitions-Bitbucket-Cloud-Atlassian-Support-03-14-2025_04_32_PM.png

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events