devstack-gate/roles/test-matrix/tasks/main.yaml

45 lines
1.2 KiB
YAML

- name: Deploy then features matrix and d-g bash functions
copy:
src: "{{ test_matrix_features }}"
dest: "{{ ansible_user_dir }}"
- name: Check for venv
command: python3 -m venv -h
changed_when: false
failed_when: false
register: venv_available
- name: Ensure venv
fail:
msg: Can not find venv module?
when:
- venv_available.rc != 0
- name: Create testmatrix venv
command: python3 -m venv /tmp/.test_matrix_venv
- name: Install PyYAML to venv
command: |
/tmp/.test_matrix_venv/bin/pip install 'PyYAML<6'
- name: Append neutron to configs for stable/ocata+
set_fact:
test_matrix_configs: "{{ test_matrix_configs }} + [ 'neutron' ]"
when:
- '"neutron" not in test_matrix_configs'
- test_matrix_branch is match("^(stable/[o-z].*|master)$")
- name: Run the test matrix
test_matrix:
features: "{{ ansible_user_dir }}/{{ test_matrix_features | basename }}"
branch: "{{ test_matrix_branch }}"
role: "{{ test_matrix_role }}"
configs: "{{ test_matrix_configs }}"
vars:
ansible_python_interpreter: "/tmp/.test_matrix_venv/bin/python"
register: test_matrix_result
- name: Set the enabled_services fact
set_fact:
enabled_services: "{{ test_matrix_result.services }}"