Update centos element for 9-stream

This adds 9-stream support to the centos element.

See https://review.opendev.org/q/topic:cs9 for related patches.

Change-Id: Ib80fbd21edb77c25764eff2c0d66e55bde7a90af
This commit is contained in:
Sagi Shnaidman 2021-09-01 02:24:36 +03:00 committed by Ian Wienand
parent 1a5c563920
commit d5a01519c6
9 changed files with 34 additions and 5 deletions

View File

@ -27,6 +27,7 @@
# Image based tests
- centos/8-build-succeeds
- centos/8-stream-build-succeeds
- centos/9-stream-build-succeeds
- fedora/build-succeeds
- opensuse/build-succeeds
- opensuse/opensuse15-build-succeeds

View File

@ -29,7 +29,12 @@ else
elif [[ "arm64" =~ "$ARCH" ]]; then
ARCH="aarch64"
fi
DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cloud.centos.org/centos/${DIB_RELEASE}/${ARCH}/images}
if [[ "${DIB_RELEASE}" == "9" ]]; then
dib_release_path=9-stream
else
dib_release_path=${DIB_RELEASE}
fi
DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://cloud.centos.org/centos/${dib_release_path}/${ARCH}/images}
else
echo 'centos root element only support the x86_64, aarch64 and ppc64le values for $ARCH'
exit 1
@ -51,7 +56,12 @@ else
if [[ "${DIB_RELEASE}" = 7 ]]; then
BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-CentOS-${DIB_RELEASE}-${ARCH}-${DIB_FLAVOR}.qcow2.xz}
else
BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-$(curl -s https://cloud.centos.org/centos/${DIB_RELEASE}/${ARCH}/images/ | grep -o "CentOS-.[^>]*${DIB_FLAVOR}-.[^>]*.qcow2" | sort -r | head -1)}
if [[ "${DIB_RELEASE}" == "9" ]]; then
dib_release_path=9-stream
else
dib_release_path=${DIB_RELEASE}
fi
BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-$(curl -s https://cloud.centos.org/centos/${dib_release_path}/${ARCH}/images/ | grep -o "CentOS-.[^>]*${DIB_FLAVOR}-.[^>]*.qcow2" | sort -r | head -1)}
fi
BASE_IMAGE_TAR=$BASE_IMAGE_FILE.tgz
IMAGE_LOCATION=$DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE

View File

@ -0,0 +1 @@
Centos Stream 9 test

View File

@ -0,0 +1,3 @@
base
epel
openstack-ci-mirrors

View File

@ -0,0 +1 @@
export DIB_RELEASE='9-stream'

View File

@ -6,7 +6,7 @@ fi
set -eu
set -o pipefail
if [[ ${DISTRO_NAME} =~ "centos" ]]; then
if [[ ${DISTRO_NAME} =~ "centos" && "${DIB_RELEASE%-stream}" -lt '9' ]]; then
# Centos has "epel-release" in extras, which is default enabled.
${YUM} install -y epel-release
else

View File

@ -6,6 +6,13 @@
"signed_shim_efi": "shim",
"grub_bios": "grub2"
}
},
"centos": {
"9": {
"signed_grub_efi": "efibootmgr grub2-efi-x64",
"signed_shim_efi": "shim",
"grub_bios": "grub2"
}
}
},
"family":{

View File

@ -33,8 +33,13 @@ elif [[ "${DISTRO_NAME}" == "debian" ]]; then
elif [[ "${DISTRO_NAME}" == "fedora" ]]; then
export DIB_DISTRIBUTION_MIRROR=$NODEPOOL_FEDORA_MIRROR
elif [[ "${DISTRO_NAME}" == "centos" ]]; then
export DIB_DISTRIBUTION_MIRROR=$NODEPOOL_CENTOS_MIRROR
export DIB_EPEL_MIRROR=$NODEPOOL_EPEL_MIRROR
if [[ "${DIB_RELEASE}" == '9-stream' ]]; then
# NOTE(ianw) 2021-10-18 : no 9-stream mirrors, yet
:
else
export DIB_DISTRIBUTION_MIRROR=$NODEPOOL_CENTOS_MIRROR
export DIB_EPEL_MIRROR=$NODEPOOL_EPEL_MIRROR
fi
elif [[ "${DISTRO_NAME}" == "centos7" ]]; then
export DIB_DISTRIBUTION_MIRROR=$NODEPOOL_CENTOS_MIRROR
export DIB_EPEL_MIRROR=$NODEPOOL_EPEL_MIRROR