|
1 | | -# Copyright (c) Microsoft Corporation. |
2 | | -# Licensed under the MIT License. |
3 | | - |
4 | | -# /*---------------------------------------------------------------------------8 |
5 | | -# | | |
6 | | -# | HA Testing Framework | |
7 | | -# | | |
8 | | -# +------------------------------------4--------------------------------------*/ |
9 | | -- hosts: localhost |
10 | | - gather_facts: true |
11 | | - name: "Setup deployer for HA Testing Framework" |
12 | | - vars_files: "./vars/input-api.yaml" |
13 | | - tasks: |
14 | | - - name: "Install python azure pacakges required" |
15 | | - become: true |
16 | | - ansible.builtin.pip: |
17 | | - name: |
18 | | - - ansible-runner |
19 | | - - azure-kusto-data |
20 | | - - azure-kusto-ingest |
21 | | - |
22 | | -- hosts: "{{ sap_sid | upper }}_SCS: |
23 | | - {{ sap_sid | upper }}_ERS" |
24 | | - name: "Host tasks" |
25 | | - gather_facts: true |
26 | | - vars_files: "./vars/input-api.yaml" |
27 | | - tasks: |
28 | | - - name: "Enable profile_tasks callback plugin" |
29 | | - ansible.builtin.set_fact: |
30 | | - ansible_callbacks: |
31 | | - profile_tasks: true |
32 | | - |
33 | | - - name: "Set the test group name based on the inputs" |
34 | | - ansible.builtin.set_fact: |
35 | | - test_group_name: "{{ sap_functional_test_type_map | selectattr('name', 'equalto', sap_functional_test_type) | map(attribute='value') | first }}" |
36 | | - run_once: true |
37 | | - |
38 | | - - name: Set the test group facts |
39 | | - ansible.builtin.set_fact: |
40 | | - test_group_start_time: "{{ now(utc=true,fmt='%Y-%m-%d %H:%M:%S') }}" |
41 | | - test_group_invocation_id: "{{ lookup('pipe', 'uuidgen') }}" |
42 | | - test_cases: "{{ test_groups | selectattr('name', 'equalto', test_group_name) | map(attribute='test_cases') | list | flatten(levels=1) }}" |
43 | | - run_once: true |
44 | | - |
45 | | - - name: "Run test cases by including them as roles" |
46 | | - ansible.builtin.include_tasks: "./roles/{{ test_group_name | lower }}/tasks/{{ item.task_name }}.yml" |
47 | | - loop: "{{ test_cases | list }}" |
48 | | - vars: |
49 | | - group_invocation_id: "{{ test_group_invocation_id }}" |
50 | | - group_start_time: "{{ test_group_start_time }}" |
51 | | - group_name: "{{ sap_functional_test_type }}" |
52 | | - when: test_group_name is defined |
53 | | - |
54 | | - - name: "Run test cases by including them as roles" |
55 | | - ansible.builtin.include_tasks: "./roles/misc/tasks/render-html-report.yml" |
56 | | - when: test_group_name is defined |
57 | | - |
| 1 | +# Copyright (c) Microsoft Corporation. |
| 2 | +# Licensed under the MIT License. |
| 3 | + |
| 4 | +# /*---------------------------------------------------------------------------8 |
| 5 | +# | | |
| 6 | +# | HA Testing Framework | |
| 7 | +# | | |
| 8 | +# +------------------------------------4--------------------------------------*/ |
| 9 | +- hosts: localhost |
| 10 | + gather_facts: true |
| 11 | + name: "Setup deployer for HA Testing Framework" |
| 12 | + vars_files: "./vars/input-api.yaml" |
| 13 | + tasks: |
| 14 | + - name: "Install python azure pacakges required" |
| 15 | + become: true |
| 16 | + ansible.builtin.pip: |
| 17 | + name: |
| 18 | + - ansible-runner |
| 19 | + - azure-kusto-data |
| 20 | + - azure-kusto-ingest |
| 21 | + |
| 22 | +- hosts: "{{ sap_sid | upper }}_SCS: |
| 23 | + {{ sap_sid | upper }}_ERS" |
| 24 | + name: "Host tasks" |
| 25 | + gather_facts: true |
| 26 | + vars_files: "./vars/input-api.yaml" |
| 27 | + tasks: |
| 28 | + - name: "Enable profile_tasks callback plugin" |
| 29 | + ansible.builtin.set_fact: |
| 30 | + ansible_callbacks: |
| 31 | + profile_tasks: true |
| 32 | + |
| 33 | + - name: "Set the test group name based on the inputs" |
| 34 | + ansible.builtin.set_fact: |
| 35 | + test_group_name: "{{ sap_functional_test_type_map | selectattr('name', 'equalto', sap_functional_test_type) | map(attribute='value') | first }}" |
| 36 | + run_once: true |
| 37 | + |
| 38 | + - name: Set the test group facts |
| 39 | + ansible.builtin.set_fact: |
| 40 | + test_group_start_time: "{{ now(utc=true,fmt='%Y-%m-%d %H:%M:%S') }}" |
| 41 | + test_group_invocation_id: "{{ lookup('pipe', 'uuidgen') }}" |
| 42 | + test_cases: "{{ test_groups | selectattr('name', 'equalto', test_group_name) | map(attribute='test_cases') | list | flatten(levels=1) }}" |
| 43 | + run_once: true |
| 44 | + |
| 45 | + - name: "Run test cases by including them as roles" |
| 46 | + ansible.builtin.include_tasks: "./roles/{{ test_group_name | lower }}/tasks/{{ item.task_name }}.yml" |
| 47 | + loop: "{{ test_cases | list }}" |
| 48 | + vars: |
| 49 | + group_invocation_id: "{{ test_group_invocation_id }}" |
| 50 | + group_start_time: "{{ test_group_start_time }}" |
| 51 | + group_name: "{{ sap_functional_test_type }}" |
| 52 | + when: test_group_name is defined |
| 53 | + |
| 54 | + - name: "Run test cases by including them as roles" |
| 55 | + ansible.builtin.include_tasks: "./roles/misc/tasks/render-html-report.yml" |
| 56 | + when: test_group_name is defined |
0 commit comments