core.cmdrunner#
cmdrunner#
Executes a list of commands in the given order. Note that multi-line commands are not supported; each line or list of strings is treated as an individual command.
Usage from a task#
The two steps below are equivalent. The first invokes the script directly; the
second uses the run: shorthand, which is desugared into the same call.
Either form runs the commands on the step’s target, by default the config’s
cijoe.default_target:
- name: explicit
target: guest
uses: core.cmdrunner
with:
commands:
- hostname
- uname -a
- name: shorthand
target: guest
run: |
hostname
uname -a
Retargetable: True#
- cijoe.core.scripts.cmdrunner.main(args, cijoe)#
Run commands one at a time via cijoe.run()
CLI arguments#
--commands COMMANDS [COMMANDS ...]The commands to be run (default: None)