-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathmain.yaml
31 lines (25 loc) · 1.01 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
- copy:
src: list_changed_targets.py
dest: /tmp/list_changed_targets.py
mode: '0700'
- set_fact:
splitter_cmd: >
python3 /tmp/list_changed_targets.py
--branch {{ zuul.branch }}
{% if ansible_test_splitter__releases_to_test is defined %}--ansible-releases {{ ansible_test_splitter__releases_to_test | join(' ') }}{% endif %}
{% if ansible_test_splitter__total_job is defined %}--total-job {{ ansible_test_splitter__total_job }}{% endif %}
{% if ansible_test_splitter__test_changed|bool %}--test-changed{% else %}--test-all-the-targets{% endif %}
{{ ansible_test_splitter__check_for_changes_in | join(' ') }}
- name: Will split up the jobs with the following command
debug:
msg: "{{ splitter_cmd }}"
- name: Split up the workload
command: "{{ splitter_cmd }}"
register: _result
- set_fact:
for_zuul_return: '{{ _result.stdout | from_json }}'
- debug: var=for_zuul_return
- name: Return the result to Zuul
zuul_return:
data: "{{ for_zuul_return.data }}"