2018-05-23 02:11:13 +00:00
|
|
|
- name: Install dib extra dependencies
|
|
|
|
command: ./install_test_deps.sh
|
|
|
|
args:
|
|
|
|
chdir: "{{ zuul.project.src_dir }}/tests"
|
|
|
|
become: yes
|
|
|
|
|
|
|
|
- name: Setup mounted space
|
|
|
|
file:
|
|
|
|
path: '/opt/dib_cache'
|
|
|
|
state: directory
|
|
|
|
mode: ugo+rw
|
|
|
|
become: yes
|
|
|
|
|
|
|
|
- name: Define upper_constraints
|
|
|
|
set_fact:
|
2019-04-19 19:26:30 +00:00
|
|
|
upper_constraints: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt"
|
2018-05-23 02:11:13 +00:00
|
|
|
|
|
|
|
- name: Take ourselves out of uppper constraints
|
|
|
|
lineinfile:
|
|
|
|
path: "{{ upper_constraints }}"
|
|
|
|
state: absent
|
|
|
|
regexp: '^diskimage-builder'
|
|
|
|
|
|
|
|
- name: Install diskimage-builder
|
|
|
|
pip:
|
|
|
|
name: "file://{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
|
|
|
|
virtualenv: "{{ dib_virtualenv }}"
|
2020-05-29 10:22:01 +00:00
|
|
|
virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
|
2018-05-23 02:11:13 +00:00
|
|
|
extra_args: "-c {{ upper_constraints }}"
|
|
|
|
|
|
|
|
- name: Setup log output
|
|
|
|
file:
|
|
|
|
path: "{{ ansible_user_dir }}/logs"
|
|
|
|
state: directory
|
|
|
|
mode: ugo+rw
|
|
|
|
|
2021-10-14 23:46:29 +00:00
|
|
|
# NOTE(ianw) 2021-10-15 : at this point dnf-plugins-core is stuck in
|
|
|
|
# the NEW queue. Use that when it is available over this hack,
|
|
|
|
# obviously.
|
|
|
|
- name: Install dnf download
|
|
|
|
shell: |
|
|
|
|
set -x
|
|
|
|
git clone https://github.com/rpm-software-management/dnf-plugins-core
|
|
|
|
mkdir /usr/lib/python3/dist-packages/dnf-plugins
|
|
|
|
cp -r dnf-plugins-core/plugins/dnfpluginscore /usr/lib/python3/dist-packages
|
|
|
|
cp dnf-plugins-core/plugins/download.py /usr/lib/python3/dist-packages/dnf-plugins
|
|
|
|
rm -rf dnf-plugins-core
|
|
|
|
echo 'pluginpath=/usr/lib/python3/dist-packages/dnf-plugins' >> /etc/dnf/dnf.conf
|
|
|
|
args:
|
|
|
|
executable: /bin/bash
|
|
|
|
become: yes
|
2021-09-28 10:35:15 +00:00
|
|
|
when: ansible_os_family == 'Debian'
|
2021-10-14 23:46:29 +00:00
|
|
|
|
2018-05-23 02:11:13 +00:00
|
|
|
- name: Run dib functional tests
|
|
|
|
shell:
|
|
|
|
cmd: |
|
|
|
|
source {{ dib_virtualenv }}/bin/activate
|
|
|
|
{{ zuul.project.src_dir }}/tests/run_functests.sh \
|
|
|
|
-L {{ ansible_user_dir }}/logs {{ dib_functests | join(' ') }} \
|
|
|
|
{{ dib_functests_extra | join(' ') }}
|
|
|
|
args:
|
|
|
|
executable: /bin/bash
|
|
|
|
environment:
|
|
|
|
DIB_NO_TMPFS: 1
|
|
|
|
TMPDIR: /opt/dib_cache
|
|
|
|
DIB_OS_CI_YUM_REPOS: "{{ dib_gate_mirror_repos|default(omit) }}"
|
2021-10-14 23:46:29 +00:00
|
|
|
# NOTE(ianw) 2021-10-15 : this might be our bullseye images
|
|
|
|
# having issues with non-root podman. This works for now.
|
|
|
|
DIB_CONTAINERFILE_PODMAN_ROOT: 1
|