-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow setting order and hooks for test role
- Allow passing hook list directly to hook role - Allow setting up stages and hooks for test operator role Jira: https://issues.redhat.com/browse/OSPRH-10106
- Loading branch information
Showing
8 changed files
with
97 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- name: Run ansibletest job | ||
vars: | ||
run_test_fw: ansibletest | ||
test_operator_config: "{{ cifmw_test_operator_ansibletest_config }}" | ||
test_operator_job_name: "{{ cifmw_test_operator_ansibletest_name }}" | ||
test_operator_kind_name: "{{ cifmw_test_operator_ansibletest_kind_name }}" | ||
test_operator_crd_name: "{{ cifmw_test_operator_ansibletest_crd_name }}" | ||
test_operator_workflow: "{{ cifmw_test_operator_ansibletest_workflow }}" | ||
ansible.builtin.include_tasks: run-test-operator-job.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- name: Run horizontest job | ||
vars: | ||
run_test_fw: horizontest | ||
test_operator_config: "{{ cifmw_test_operator_horizontest_config }}" | ||
test_operator_job_name: "{{ cifmw_test_operator_horizontest_name }}" | ||
test_operator_kind_name: "{{ cifmw_test_operator_horizontest_kind_name }}" | ||
test_operator_crd_name: "{{ cifmw_test_operator_horizontest_crd_name }}" | ||
test_operator_workflow: [] | ||
ansible.builtin.include_tasks: run-test-operator-job.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- name: Run tempest job | ||
vars: | ||
run_test_fw: tempest | ||
test_operator_config: "{{ cifmw_test_operator_tempest_config }}" | ||
test_operator_job_name: "{{ cifmw_test_operator_tempest_name }}" | ||
test_operator_kind_name: "{{ cifmw_test_operator_tempest_kind_name }}" | ||
test_operator_crd_name: "{{ cifmw_test_operator_tempest_crd_name }}" | ||
test_operator_workflow: "{{ cifmw_test_operator_tempest_workflow }}" | ||
test_operator_config_playbook: tempest-tests.yml | ||
ansible.builtin.include_tasks: run-test-operator-job.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Since Tobiko may include disruptive tests (faults), it is better to execute it at the end | ||
- name: Run tobiko job | ||
vars: | ||
run_test_fw: tobiko | ||
test_operator_config: "{{ cifmw_test_operator_tobiko_config }}" | ||
test_operator_job_name: "{{ cifmw_test_operator_tobiko_name }}" | ||
test_operator_kind_name: "{{ cifmw_test_operator_tobiko_kind_name }}" | ||
test_operator_crd_name: "{{ cifmw_test_operator_tobiko_crd_name }}" | ||
test_operator_workflow: "{{ cifmw_test_operator_tobiko_workflow }}" | ||
test_operator_config_playbook: tobiko-tests.yml | ||
ansible.builtin.include_tasks: run-test-operator-job.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
- debug: | ||
msg: "Run stage {{ stage_vars.name }}" | ||
|
||
- name: "Call pre stage hooks for test operator stage {{ stage_vars.name }}" | ||
vars: | ||
step: none | ||
hook_list: "{{ stage_vars.pre_stage_hooks }}" | ||
ansible.builtin.import_role: | ||
name: run_hook | ||
when: | ||
- not cifmw_test_operator_dry_run | bool | ||
- stage_vars.pre_stage_hooks is defined | ||
|
||
- name: Include stage var file | ||
ansible.builtin.include_vars: | ||
file: "{{ stage_vars.test_file }}" | ||
|
||
- name: "Call {{ stage_vars.type }} runner" | ||
ansible.builtin.include_tasks: "runners/{{ stage_vars.type }}_runner.yml" | ||
|
||
- name: "Call post stage hooks for test operator stage {{ stage_vars.name }}" | ||
vars: | ||
step: stage_vars.post_stage_hooks | ||
ansible.builtin.import_role: | ||
name: run_hook | ||
when: | ||
- not cifmw_test_operator_dry_run | bool | ||
- stage_vars.post_stage_hooks is defined |