Add zuul_work_dir to run-test-command
To make it so that a repo can host a simple command which is an integration test of multiple projects, add the semi-standard zuul_work_dir variable to the job. Change-Id: I265469ac9c12c3a38a11b243f3ff747d27141f21
This commit is contained in:
parent
adf84f02db
commit
a3ba8e309a
@ -14,5 +14,5 @@
|
||||
- name: Run test_command
|
||||
command: '{{ item }}'
|
||||
args:
|
||||
chdir: '{{ zuul.project.src_dir }}'
|
||||
chdir: '{{ zuul_work_dir | default(zuul.project.src_dir) }}'
|
||||
with_items: '{{ test_commands }}'
|
||||
|
@ -36,6 +36,11 @@
|
||||
To use this, set the ``test_command`` variable to a single command or
|
||||
a list of commands. For complex list of commands, it is recommended to
|
||||
use a single command that runs a proper script.
|
||||
|
||||
.. zuul:jobvar:: zuul_work_dir
|
||||
:default: {{ zuul.project.src_dir }}
|
||||
|
||||
Path to operate in.
|
||||
run: playbooks/run-test-command/run.yaml
|
||||
vars:
|
||||
test_command: "exit 1"
|
||||
|
Loading…
Reference in New Issue
Block a user