Add Fedora CoreOS kubevirt image for tests (#6337)

pull/6333/head
bozzo 2020-07-10 10:07:48 +02:00 committed by GitHub
parent 22996babcf
commit 8cb644fbec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 3 deletions

View File

@ -36,6 +36,12 @@ images:
checksum: sha256:e3c1b309d9203604922d6e255c2c5d098a309c2d46215d8fc026954f3c5c27a0 checksum: sha256:e3c1b309d9203604922d6e255c2c5d098a309c2d46215d8fc026954f3c5c27a0
converted: true converted: true
fedora-coreos:
filename: fedora-coreos-32.20200601.3.0-openstack.x86_64.qcow2.xz
url: https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/32.20200601.3.0/x86_64/fedora-coreos-32.20200601.3.0-openstack.x86_64.qcow2.xz
checksum: sha256:fe78c348189d745eb5f6f80ff9eb2af67da8e84880d264f4301faaf7c2a72646
converted: true
centos-7: centos-7:
filename: CentOS-7-x86_64-GenericCloud-1809.qcow2 filename: CentOS-7-x86_64-GenericCloud-1809.qcow2
url: http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1809.qcow2 url: http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1809.qcow2

View File

@ -13,16 +13,22 @@
with_dict: with_dict:
- "{{ images }}" - "{{ images }}"
- name: Unxz compressed images
command: unxz --force {{ images_dir }}/{{ item.value.filename }}
with_dict:
- "{{ images }}"
when:
- item.value.filename.endswith('.xz')
- name: Convert images which is not in qcow2 format - name: Convert images which is not in qcow2 format
command: qemu-img convert -O qcow2 {{ images_dir }}/{{ item.value.filename }} {{ images_dir }}/{{ item.key }}.qcow2 command: qemu-img convert -O qcow2 {{ images_dir }}/{{ item.value.filename.rstrip('.xz') }} {{ images_dir }}/{{ item.key }}.qcow2
with_dict: with_dict:
- "{{ images }}" - "{{ images }}"
when: when:
- not (item.value.converted|bool) - not (item.value.converted|bool)
register: converted
- name: Make sure all images are ending with qcow2 - name: Make sure all images are ending with qcow2
command: cp {{ images_dir }}/{{ item.value.filename }} {{ images_dir }}/{{ item.key }}.qcow2 command: cp {{ images_dir }}/{{ item.value.filename.rstrip('.xz') }} {{ images_dir }}/{{ item.key }}.qcow2
with_dict: with_dict:
- "{{ images }}" - "{{ images }}"
when: when: