zuul-jobs/playbooks/run-test-command/run.yaml
Tristan Cacqueray 1475af7158 run-test-command: support list in test_command variable
This change enable run-test-command to use a list of commands.

Change-Id: I7727c8330593a548a1bc66765bc632abfb9df1c8
2018-11-22 01:23:40 +00:00

19 lines
471 B
YAML

- hosts: all
tasks:
- name: Convert test_command to list
set_fact:
test_commands: ['{{ test_command }}']
when: test_command | type_debug != 'list'
- name: Use test_command list
set_fact:
test_commands: '{{ test_command }}'
when: test_command | type_debug == 'list'
- name: Run test_command
command: '{{ item }}'
args:
chdir: '{{ zuul.project.src_dir }}'
with_items: '{{ test_commands }}'