!JobArray

A !JobArray is similar to a !JobGroup in that it may contain multiple !Job and !JobGroup instances, but unlike a !JobGroup the child jobs are repeated a specified number of times.

!JobArray
  id     : top
  repeats: 4
  cwd    : /path/to/working/directory
  env    :
    ENV_KEY_A: abcde
    ENV_KEY_B: 12345
  jobs   :
    - !Job
        id     : echo_count
        command: echo
        args   :
          - "${GATOR_ARRAY_INDEX}"
    - ...
  on_done:
    - job_that_may_pass_or_fail
  on_pass:
    - job_that_must_pass
  on_fail:
    - job_that_will_fail

Note

The GATOR_ARRAY_INDEX environment variable indexes which pass is currently being executed.

Field Required Description
id Identifier for the job array, used to navigate job hierarchy
repeats Number of times to repeat jobs in the list, defaults to 1
cwd Working directory, if not specified then the launch shell's $CWD is used
env Dictionary of environment variables to overlay
jobs !Job, !JobGroup, or !JobArray to repeatedly run
on_done List of other tasks that must complete (pass or fail) before launching this array
on_pass List of other tasks that must succeed before launching this array
on_fail List of other tasks that must fail before launching this array

Note

Dependencies specified in on_done, on_pass, and on_fail are ANDed together, such that all tasks listed must complete with the relevent pass or failure state before the dependent task is started.