Open matfax opened 6 years ago
It seems to me like a string type would be more appropriate for your example. The values are being used as part of a shell command, which is a string. Using a list introduces new problems, like how should the list be joined to create a string (which is what is actually needed). We could assume it will always be joined with a single space, but that may not always be a safe assumption.
Edit: reading the last line I see that the desired behaviour is not what I first expected. It is to expand a single step into multiple steps.
@dnephin You are right, foreach
would be more appropriate.
This is something we're exploring, but we're hesitant to put too much control flow logic at the meta-layer. We aren't trying to build a programming language in YAML, but we do want to find ways to let you do common things in a DRY way.
Hello, Is there a way or practice or method by which this can achieved in the current product? Thanks!
+100. Please implement as soon as possible.
Any update on that?
Would come in handy indeed.
I'm quite disappointed that this is still unresolved, after five years.
I would like to make another suggestion for a further feature. For me, it would come very handy if you added support for some kind of array, list or set parameter that can be parsed to a list of steps. Here is an example of how it may look:
This is just an example, but imagine the same for build preparation where you pass a variable number of arguments per build, having a 1:n relation. I could use that for
docker tag << foreach.tag >>
.