Skip to main content

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

  1. 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 }
  2. Observe:
    1. for the parallel statement, containers are run in parallel (all at once without order)
    2. for the serial statement, containers are run serially (one by one in order)