Allow list-type parameters in Orbs
D
David Henderson
It'd be useful to allow handling lists of values for a parameter, without having to resort to workarounds like parsing comma-separated lists in
string
types.I think it would be useful to be able to specify something like:
steps:
- myorb/foo:
bar:
- baz
- qux
And have the
myorb/foo
command called with a bar
parameter equal to [ "baz", "qux" ]
.CCI-I-701
T
Tal Marcovich
Is there any update on this? This is a feature request from 2018...
Pete Nelson
My use case is i want the ability to bake my caching logic into my install dependencies command. But I have no way of passing the
paths
parameter to my command until you add list type. This is bothersome I have no way to do thisJames Nail
Pete Nelson this is exactly my use case as well!
R
Rob Duncan
Any updates on this? Not being able to create a basic yaml structure list like this feels so inadequate in 2023.
Jeff Valore
I ran into this limitation trying to set up standard workflows for installing dependencies then caching them (i.e. run
yarn install
then save_cache the downloaded files) but since you can't take in a List, you can't pass customizable paths through your own command to save_cache
.We are approaching 5 years and this unfortunately still doesn't exist. CircleCI could have been so good, but necessary functionality like this is never added (I've given up on so many CI plans due to the CircleCI limitations). Passing Lists must already exist in some form because
save_cache
can take a "List".Jsteinberg
Still needed. Folks iterating in templates is an old thing, e.g. xml, erb, ego, helm. I think we just need to get over it and do it here because not having a parameter of type list is fairly comical at this point and probably something that all other CIs do.
D
Diógenes Fernandes Hermínio
What is the current workaround for that?
G
Gleb Stsenov
it also needs some helpers around it - at least for-loop and concatenation.
Wish CircleCI could opensource this part..
Steve Lewis
Similar to many below, I just ran into this in trying to template our usage of persist_to_workspace paths for a private orb.
FWIW - I believe this wouldn't need any looping construct to be valuable in many contexts.
Jayson Smith
I've recently run into this when trying to pass a collection to the paths key for save_cache in an orb I've written.
Kyle Robertson
Jayson Smith How did you end up working around this? I really would love to be able to do exactly this as well
Patrick-Ranjit D. Madsen
yes, something like tags are an obvious use-case. Similarly, a map type for passing for instance configurations etc. to a re-usable command would be fantastic.
Load More
→