1) use CentOS 7 hosts to build VM images: CentOS 8 is not supported as a
build host according to diskimage-builder documentation:
https://docs.openstack.org/diskimage-builder/latest/user_guide/supported_distros.html
(page checked on 2022-02-08)
2) add missing packages for diskimage-builder: qemu-img kpartx sudo
e2fsprogs
3) use "python3 -m venv" instead of virtualenv (else the pipeline fails
because of https://github.com/pypa/virtualenv/issues/1029)
Change-Id: I14daf76dded1f230e12c47218ddcb1fe9029bcd8
Signed-off-by: Gwenael Lambrouin <gwenael.lambrouin@orange.com>
 
 verify-image:
   stage: build
-  image: centos:8
+  image: centos:7
   before_script:
-    - dnf -y install python3-virtualenv
-    - virtualenv venv
+    - yum -y install python3 qemu-img kpartx sudo e2fsprogs
+    - python3 -m venv venv
   script:
     - source venv/bin/activate
     - !reference [.gsutil-install, script]
 
 build-image:
   stage: deploy
-  image: centos:8
+  image: centos:7
   before_script:
-    - dnf -y install python3-virtualenv
-    - virtualenv venv
+    - yum -y install python3 qemu-img kpartx sudo e2fsprogs
+    - python3 -m venv venv
   script:
     - source venv/bin/activate
     - !reference [.gsutil-install, script]