I am looking into the (highly anticipated) functionality just released on bitbucket that allows us to export pipelines in one repo and import them to another. We typically create re-useable steps in our `definitions:steps` section using anchor tags as supported but the yaml spec:
definitions:
steps:
step: &someBuildStep
name: step 1
...
and then later ref them in the actual pipeline:
- step: *someBuildStep
- step: *compile
- step: *runTests
This allows us to use the steps over in distinct pipelines in a single file (and is as Atlassian documents it)
Trying to apply this in the new import/export appears to have issues or be unsupported. The "export" side of it passes validation and the ref from the import side appears to find the exported pipeline but reports an error :
There is an error in the imported bitbucket-pipelines.yml file. The error is at [definitions > pipelines > some-pipeline-ident > 0]. Step is empty, null, or missing. So it does not appear to handle the anchor tags as I would expect. Has anyone else looked at this and tried to get it working? We can, obviously, revert to embedding the steps in the individual pipelines but this means maintaining the same exact steps in multiple build pipelines. Any ideas?
I have similar issue and I don't see any refs in your provided example in the importing repo, so it does not seem to be addressing the specific problem in the original question.