zuul-jobs/roles/test-setup/tasks/main.yaml
Kenneth Giusti 1eafcaabbb Parameterize the test-setup role
The patch will allow jobs to set environment variables and pass
command line arguments to the test-setup.sh script defined by a
project.

This can be used to customize the setup based on the particular job
being run.

Change-Id: I11e1ab15fd2bf3c734544121d9b4040b99ee63da
2017-12-07 09:48:38 -05:00

14 lines
353 B
YAML

- name: Check if project's tools/test-setup.sh exists
stat:
path: "{{ zuul_work_dir }}/tools/test-setup.sh"
register: p
- name: Run tools/test-setup.sh
command: tools/test-setup.sh {{ test_setup_args }}
environment: "{{ test_setup_environment }}"
args:
chdir: "{{ zuul_work_dir }}"
when:
- p.stat.exists
- p.stat.executable