Eduardo Olivares 4ad11e3710 Download ubuntu images prior to pytest execution
Tobiko downloads images from their URL when their test need to upload
them to glance
In some cases this is problematic because some of those images are big
and there may be timeouts affecting the tests

With this patch, tobiko downloads the ubuntu-minimal image before the
tobiko tests are executed (during the execution of the ansible/infrared
tobiko roles), which should avoid timeouts during the test execution

The intention is to extend this patch to other images such as CentOS,
RHEL and Fedora

NOTE: this patch does not modify the tests, it just adds the role so
that the Ubuntu images are downloaded - a later patch will modify the
tests so that they stop downloading the images and find them in the
configured path instead

Change-Id: Ifff8214b7d4a3c2a78d97b171714090fd64d60dd
2023-02-03 08:20:04 +00:00

63 lines
2.0 KiB
YAML

---
# --- Tobiko workflow stages
test_stage: all
test_no_become: "{{ ansible_os_family in ['Darwin'] }}"
test_become: '{{ not (test_no_become | bool) }}'
# --- Test deploy options -----------------------------------------------------
test_deploy_home: '{{ ansible_user_dir }}/src'
git_base: 'https://opendev.org'
test_dir: "{{ test_deploy_home }}/{{ test_project }}"
test_project:
"{{ test_git_repo | urlsplit('path') | regex_replace('^\\/|\\/$', '') | splitext | first }}"
test_git_repo: '{{ git_base }}/x/tobiko.git'
test_src_dir: ''
# NOTE: if test_dir and tobiko_dir variables endup being the same actual
# directory then test_src and test_git_* variables will be overriden
# tobiko_src and tobiko_git_* variables
tobiko_dir: "{{ test_deploy_home }}/{{ tobiko_project }}"
tobiko_project:
"{{ tobiko_git_repo | urlsplit('path') | regex_replace('^\\/|\\/$', '') | splitext | first }}"
tobiko_git_repo: '{{ git_base }}/x/tobiko.git'
tobiko_src_dir: ''
# --- Test configuration options ----------------------------------------------
# Configuration options
test_conf_file: '{{ test_dir | realpath }}/tobiko.conf'
test_conf: {}
# --- Test report options -----------------------------------------------------
# Remote directory where test cases shoulw write report files to
test_report_dir: "{{ test_dir | realpath }}/report"
test_report_files:
- '{{ test_conf_file | realpath }}'
- '{{ test_log_file | realpath }}'
# Test report files prefix
test_report_name: tobiko_results
# Log file where test cases should write logging messages to
test_log_file: '{{ test_report_dir | realpath }}/tobiko.log'
# Local where test cases results are being collected to
test_collect_dir: '{{ test_src_dir | realpath }}/{{ test_report_name }}'
# --- download-images options -------------------------------------------------
download_images_dir: "{{ ansible_user_dir }}/.downloaded-images"
download_images:
ubuntu-minimal:
type: ubuntu
url: "https://cloud-images.ubuntu.com/minimal/releases/jammy/release/ubuntu-22.04-minimal-cloudimg-amd64.img"