Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fedora CoreOS kubevirt image for tests #6337

Merged
merged 1 commit into from
Jul 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ images:
checksum: sha256:e3c1b309d9203604922d6e255c2c5d098a309c2d46215d8fc026954f3c5c27a0
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:
filename: CentOS-7-x86_64-GenericCloud-1809.qcow2
url: http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1809.qcow2
Expand Down
12 changes: 9 additions & 3 deletions test-infra/image-builder/roles/kubevirt-images/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,22 @@
with_dict:
- "{{ 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
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:
- "{{ images }}"
when:
- not (item.value.converted|bool)
register: converted

- 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:
- "{{ images }}"
when:
Expand Down