diff --git a/playbooks/argo_healthcheck.yml b/playbooks/argo_healthcheck.yml index 2259876..56016ce 100644 --- a/playbooks/argo_healthcheck.yml +++ b/playbooks/argo_healthcheck.yml @@ -3,6 +3,16 @@ hosts: localhost connection: local gather_facts: false + vars: + with_retries: false + max_retries: 60 + retry_count: 0 + retry_delay: 60 tasks: - name: Check health of argo applications ansible.builtin.include_tasks: tasks/check_argo_health.yml + when: not (with_retries | bool) + + - name: Wait for all Argo applications to be healthy and synced with retry logic + ansible.builtin.include_tasks: tasks/retry_argo_healthcheck.yml + when: with_retries | bool diff --git a/playbooks/pattern_ci.yml b/playbooks/pattern_ci.yml new file mode 100644 index 0000000..6af9a6c --- /dev/null +++ b/playbooks/pattern_ci.yml @@ -0,0 +1,27 @@ +--- +- name: Run interop test + hosts: localhost + connection: local + gather_facts: false + roles: + - role: pattern_settings # set general pattern vars + + tasks: + + - name: Resolve and set some pattern related vars (same as install_settings) + ansible.builtin.include_role: + name: install_settings + tasks_from: resolve_overrides + + - name: Run pytest with clustergroup {{ target_clustergroup }} + ansible.builtin.command: + cmd: pytest -lv test_{{ target_clustergroup }}.py --junit-xml .results/test_{{ target_clustergroup }}.xml + chdir: "{{ pattern_dir }}/tests/ci/" + environment: + WORKSPACE: "{{ pattern_dir }}/tests/ci/" + changed_when: false + register: pytest_out + + - name: Log pytest output + ansible.builtin.debug: + msg: "{{ pytest_out.stdout }}"