Serial and parallel looping
TLDR;
Opctl supports using serialLoop and/or parallelLoop statements to make parts of your op run in a loop.
Example
- Start this op:
name: serialAndParallelLooping
run:
serial:
- parallelLoop:
range: [1,2,3]
vars:
index: $(index)
value: $(value)
run:
container:
cmd: [echo, "parallelLoop| index: $(index), value: $(value)"]
image: { ref: alpine }
- serialLoop:
range: [1,2,3]
vars:
index: $(index)
value: $(value)
run:
container:
cmd: [echo, "serialLoop| index: $(index), value: $(value)"]
image: { ref: alpine } - Observe:
- for the
parallelLoop
statement, containers for all values inrange
are run in parallel (all at once without order) - for the
serialLoop
statement, containers for all values inrange
are run serially (one by one in order)
- for the