Skip to content

Commit a01bf01

Browse files
committed
Run scenario test automation
1 parent ae6b309 commit a01bf01

File tree

3 files changed

+125
-0
lines changed

3 files changed

+125
-0
lines changed

ci/playbooks/run-deploy.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
- name: Create hotstack scenario
3+
hosts: hotstack
4+
vars:
5+
hotstack_work_dir: "{{ ansible_user_dir }}/hotstack"
6+
tasks:
7+
8+
- name: Fetch bootstrap vars from remote to zuul executor
9+
ansible.builtin.fetch:
10+
src: "{{ scenario_dir }}/{{ scenario }}/bootstrap_vars.yml"
11+
dest: "{{ zuul.executor.work_root }}/bootstrap_vars.yml"
12+
flat: true
13+
14+
- name: Load bootstrap vars with template resolution
15+
ansible.builtin.include_vars:
16+
file: "{{ zuul.executor.work_root }}/bootstrap_vars.yml"
17+
name: bootstrap_vars
18+
19+
- name: Fetch automation vars from remote to zuul executor
20+
ansible.builtin.fetch:
21+
src: "{{ bootstrap_vars.test_operator_automation_vars_file }}"
22+
dest: "{{ zuul.executor.work_root }}/{{ bootstrap_vars.automation_vars_file | basename }}"
23+
flat: true
24+
25+
- name: Load automation vars with template resolution
26+
ansible.builtin.include_vars:
27+
file: "{{ zuul.executor.work_root }}/{{ bootstrap_vars.automation_vars_file | basename }}"
28+
name: deploy_automation_vars
29+
30+
- name: Fetch stack outputs from remote to zuul executor
31+
no_log: true
32+
ansible.builtin.fetch:
33+
src: "{{ hotstack_work_dir }}/hs-{{ zuul.build }}-outputs.yaml"
34+
dest: "{{ zuul.executor.work_root }}/hs-{{ zuul.build }}-outputs.yaml"
35+
flat: true
36+
37+
- name: Load stack output vars with template resolution
38+
no_log: true
39+
ansible.builtin.include_vars:
40+
file: "{{ zuul.executor.work_root }}/hs-{{ zuul.build }}-outputs.yaml"
41+
name: stack_outputs
42+
43+
- name: Add Hotstack controller-0 to ansible inventory
44+
no_log: true
45+
ansible.builtin.add_host: "{{ stack_outputs.controller_ansible_host }}"
46+
47+
- name: Wait for Hotstack controller-0 to be ready
48+
no_log: true
49+
delegate_to: "{{ stack_outputs.controller_ansible_host.name }}"
50+
ansible.builtin.wait_for_connection:
51+
delay: 5
52+
timeout: 300
53+
54+
- name: Run scenario RHOSO deploy automation
55+
vars:
56+
work_dir: "{{ scenario_dir }}/{{ scenario }}/test-operator"
57+
automation: "{{ deploy_automation_vars }}"
58+
ansible.builtin.include_role:
59+
name: hotloop
60+
apply:
61+
delegate_to: controller-0

ci/playbooks/run-test-operator.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
- name: Create hotstack scenario
3+
hosts: hotstack
4+
vars:
5+
hotstack_work_dir: "{{ ansible_user_dir }}/hotstack"
6+
tasks:
7+
8+
- name: Fetch bootstrap vars from remote to zuul executor
9+
ansible.builtin.fetch:
10+
src: "{{ scenario_dir }}/{{ scenario }}/bootstrap_vars.yml"
11+
dest: "{{ zuul.executor.work_root }}/bootstrap_vars.yml"
12+
flat: true
13+
14+
- name: Load bootstrap vars with template resolution
15+
ansible.builtin.include_vars:
16+
file: "{{ zuul.executor.work_root }}/bootstrap_vars.yml"
17+
name: bootstrap_vars
18+
19+
- name: Fetch test operator automation vars from remote to zuul executor
20+
ansible.builtin.fetch:
21+
src: "{{ bootstrap_vars.test_operator_automation_vars_file }}"
22+
dest: "{{ zuul.executor.work_root }}/{{ bootstrap_vars.test_operator_automation_vars_file | basename }}"
23+
flat: true
24+
25+
- name: Load test operator automation vars with template resolution
26+
ansible.builtin.include_vars:
27+
file: "{{ zuul.executor.work_root }}/{{ bootstrap_vars.test_operator_automation_vars_file | basename }}"
28+
name: test_operator_automation_vars
29+
30+
- name: Fetch stack outputs from remote to zuul executor
31+
no_log: true
32+
ansible.builtin.fetch:
33+
src: "{{ hotstack_work_dir }}/hs-{{ zuul.build }}-outputs.yaml"
34+
dest: "{{ zuul.executor.work_root }}/hs-{{ zuul.build }}-outputs.yaml"
35+
flat: true
36+
37+
- name: Load stack output vars with template resolution
38+
no_log: true
39+
ansible.builtin.include_vars:
40+
file: "{{ zuul.executor.work_root }}/hs-{{ zuul.build }}-outputs.yaml"
41+
name: stack_outputs
42+
43+
- name: Add Hotstack controller-0 to ansible inventory
44+
no_log: true
45+
ansible.builtin.add_host: "{{ stack_outputs.controller_ansible_host }}"
46+
47+
- name: Wait for Hotstack controller-0 to be ready
48+
no_log: true
49+
delegate_to: "{{ stack_outputs.controller_ansible_host.name }}"
50+
ansible.builtin.wait_for_connection:
51+
delay: 5
52+
timeout: 300
53+
54+
- name: Run scenario test automation
55+
vars:
56+
work_dir: "{{ scenario_dir }}/{{ scenario }}/test-operator"
57+
automation: "{{ test_operator_automation_vars }}"
58+
ansible.builtin.include_role:
59+
name: hotloop
60+
apply:
61+
delegate_to: controller-0

zuul.d/jobs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
vars:
5555
cloud_name: vexxhost
5656
scenario: sno-2-bm
57+
run:
58+
- ci/playbooks/run-deploy.yml
59+
- ci/playbooks/run-tests.yml
5760
files:
5861
- ^scenarios/sno-2-bm/.*
5962
- ^roles/.*

0 commit comments

Comments
 (0)