circleci-cli
circleci-cli copied to clipboard
Support anchors and aliases across YAML files in decomposed orbs
- [x] I have read Contribution Guidelines.
- [x] I have checked for similar issues and haven't found anything relevant.
- [x] This is not a security issue (which should be reported here: https://circleci.com/security/)
Do you want to request a feature or report a bug? Request a feature.
What is the current behavior?
circleci config pack
produces an "unknown anchor" error when attempting to define a YAML anchor in one file and alias it in another.
Can you provide an example?
Example directory structure:
my-orb/src/
├ anchors
│ └ @anchors.yml
└ commands
└ my-command.yml
@anchors.yml:
my-anchor: &my-anchor my-value
my-command.yml:
description: *my-anchor
running circleci config pack:
> circleci config pack src
Error: Failed trying to marshal the tree to YAML : yaml: unknown anchor 'my-anchor' referenced
What is the expected behavior?
running circleci config pack:
> circleci config pack src
anchors:
my-anchor: my-value
commands:
my-command:
description: my-value
Which version of the CLI and OS are you using? Did this work in previous versions?
> circleci version
0.1.5879+416032d
I am not aware of a version where this ever worked.
Is there any progress on this? Especially big config files, like ours (> 1000 lines) need both, packaging and working anchors.
cc @KunalJain
Digging a little deeper into this, although it's unlikely I'll be able to get around to implementing it until #432 is complete.
Is there any workaround for this as of today? 🤔
Hello! Just wanted to see if there was any update on this? 😊
I have a workaround where I do some manual preprocessing for merging aliases/anchors but it's a bit messy 🤷♂️ Would be super cool if this was able to become a builtin feature!
Hello do you have any advance regarding this? Im facing the same issue
That's sad to tell people to upgrade and use pack
but also loosing this ability. Is there any tips or direction that could be provided by CircleCI's team, so maybe one of us could implement it?
At least let us use include()
for anchors files. :)
Also facing the same issue. Any updates on this? Thank you!
Any updates?
I also want to know how to support the context
/anchors
declaration when executing the circleci config pack.
Digging a little deeper into this, although it's unlikely I'll be able to get around to implementing it until #432 is complete.
this was merged over 3 years ago, can this be worked on sometime?