Forums

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

How to include deployment in the child pipeline

Roshan Shetty
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!
July 31, 2025

HI,

I have looked at the recent child/parent pipeline and able to use a step to import a child pipeline definitions.  However, I am unable to use "deployments" in the child or parent pipeline.  Error I get is:

There is an error in the imported bitbucket-pipelines.yml file. Child pipelines cannot contain deployment steps. Please remove them from the child pipeline.

I understand it is not possible to directly use "deployment" key. However, is there any alternate way I can call the deployment in the child pipeline or use deployment in the parent pipeline.  

Thanks

 

 

 

1 answer

1 accepted

1 vote
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 3, 2025

Hi @rosha 

You are correct, it is not possible to use the deployment key in child pipelines, this is also not possible in parent pipelines where the child pipeline is referenced. Deployments can only be used in regular steps (see example below), or you can deploy using a script in the child pipeline (although this would not involve deployment tracking), for example:

 parent-pipeline:

  - step:
          type: pipeline
          name: "Run child pipeline"
          custom: child-pipeline
  - step:
        name: "Deploy to staging"
       deployment: staging
        script: - ./deploy.sh
child-pipeline:
- step:
name: "Build and Test"
script:
- ./build-and-test.sh

Please let me know if further clarification is needed.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

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

Atlassian Community Events