.gitlab-ci.yml: fix vm image jobs 90/72890/5
authorGwenael Lambrouin <gwenael.lambrouin@orange.com>
Mon, 21 Feb 2022 14:15:47 +0000 (15:15 +0100)
committerGwenael Lambrouin <gwenael.lambrouin@orange.com>
Mon, 21 Feb 2022 14:15:47 +0000 (15:15 +0100)
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>
.gitlab-ci.yml

index 41d7fa2..1ab02fe 100644 (file)
@@ -36,10 +36,10 @@ tox-py36:
 
 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]
@@ -53,10 +53,10 @@ verify-image:
 
 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]