98
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
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?
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.
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.
E
Emerson Farrugia
An obvious use case being https://github.com/CircleCI-Public/aws-ecr-orb/issues/20, e.g. ``
tags: - ${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM} - ${CIRCLE_SHA1} - "latest"
``