Skip to content

Commit

Permalink
Reword the job unit command reference (Infra) (#918)
Browse files Browse the repository at this point in the history
Reword the job unit `command` reference

- Remove old wording (we don't have UI with a "test" button anymore)
- Add recommendation to call a shell script rather than writing a
multi-line command
  • Loading branch information
pieqq authored Jan 9, 2024
1 parent 49d7a4e commit 4c0531c
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions docs/reference/units/job.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,23 @@ Following fields may be used by the job unit:

``command``:
(optional). A command can be provided, to be executed under specific
circumstances. For ``manual``, ``user-interact`` and ``user-verify``
jobs, the command will be executed when the user presses a "test"
button present in the user interface. For ``shell`` jobs, the
command will be executed unconditionally as soon as the job is
started. In both cases the exit code from the command (0 for
success, !0 for failure) will be used to set the test's outcome. For
``manual``, ``user-interact`` and ``user-verify`` jobs, the user can
override the command's outcome. The command will be run using the
default system shell. If a specific shell is needed it should be
instantiated in the command. A multi-line command or shell script
can be used with the usual multi-line syntax.

Note that a ``shell`` job without a command will do nothing.
circumstances.

For ``manual``, ``user-interact`` and ``user-verify`` jobs, the command
will be executed when the user starts the test. For ``shell`` jobs,
the command will be executed unconditionally as soon as the job is
started. In both cases the exit code from the command (``0`` for success,
``!0`` for failure) will be used to set the test outcome. For ``manual``,
``user-interact`` and ``user-verify`` jobs, the user can override the
command outcome.

The command will be run using the default system shell. If a specific
shell is needed it should be instantiated in the command.

It is recommended to call a shell script rather than writing a multi-line
command.

Note: A ``shell`` job without a command will do nothing.

.. _Job purpose field:

Expand Down

0 comments on commit 4c0531c

Please sign in to comment.