I have defined multiple custom pipelines, and I want to reuse them in other custom pipeline.
The yaml file looks like this:

I want snapshot and restore custom pipelines run inside the deploy pipeline. I was searching a lot online. someone suggests me to use this format, others suggest me to use the yaml anchore. I have tried both, none of them works. I always got the configure error when I try to run it.
the error looks like this
There is an error in your bitbucket-pipelines.yml at [pipelines > custom > deployStagingNew > 2 > step]. To be precise: This section should be a map (it is currently defined as a list).
One thing I haven't tried, which is to use definitions. However, I don't want to add extra codes. I really appreciate any inputs.