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
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.