Say I have something like:
Stage one:
stage: one
extends: .build
variables:
DOCKERFILE: "one.Dockerfile"
Stage two:
stage: two
extends: .build
variables:
DOCKERFILE: "two.Dockerfile"
Does YAML have the capability to do something like:
names = ["one", "two"]
for name in names:
Stage name:
stage: name
extends: .build
variables:
DOCKERFILE: "name.Dockerfile"
I know there exist e.g. anchors, but I don't think they'd allow for this. I am pretty sure YAML doesn't have anything like a for
loop specifically, but I'm hoping it has something that'd allow me to parameterize sections like this. Does it?