Serial and parallel execution
TLDR;
Opctl supports using serial and/or parallel statements to make parts of your op run serially (one by one in order) or in parallel (all at once without order).
Example
- Start this op:
name: serialAndParallelExecution
run:
serial:
- parallel:
- container:
cmd: [echo, "parallel[0]"]
image: { ref: alpine }
- container:
cmd: [echo, "parallel[1]"]
image: { ref: alpine }
- serial:
- container:
cmd: [echo, "serial[0]"]
image: { ref: alpine }
- container:
cmd: [echo, "serial[1]"]
image: { ref: alpine } - Observe:
- for the
parallel
statement, containers are run in parallel (all at once without order) - for the
serial
statement, containers are run serially (one by one in order)
- for the