Merge "Parameterize the test-setup role"
This commit is contained in:
commit
d28c326b36
@ -8,3 +8,15 @@ be run.
|
||||
This allows projects to specify test-setup steps (such as creating or
|
||||
initializing a database) in a form that can be easily run by both an
|
||||
automated testing system and developers.
|
||||
|
||||
**Role Variables**
|
||||
|
||||
.. zuul:rolevar:: test_setup_environment
|
||||
|
||||
Environment variables to pass in to the test-setup script.
|
||||
|
||||
.. zuul:rolevar:: test_setup_args
|
||||
|
||||
String of optional command line options passed to
|
||||
the test-setup script.
|
||||
|
||||
|
@ -1,2 +1,6 @@
|
||||
---
|
||||
test_setup_args: ""
|
||||
test_setup_environment: {}
|
||||
|
||||
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
|
||||
|
||||
|
@ -4,7 +4,8 @@
|
||||
register: p
|
||||
|
||||
- name: Run tools/test-setup.sh
|
||||
command: tools/test-setup.sh
|
||||
command: tools/test-setup.sh {{ test_setup_args }}
|
||||
environment: "{{ test_setup_environment }}"
|
||||
args:
|
||||
chdir: "{{ zuul_work_dir }}"
|
||||
when:
|
||||
|
Loading…
Reference in New Issue
Block a user