Add image build test on Centos8 stream

build image on Centos8 stream

Change-Id: I759d482430eaf0e9304986c9fad047cbd44c09ca
This commit is contained in:
wu.chunyang 2022-04-15 21:05:55 +08:00
parent a5ddaddded
commit 4d8e55c5fe
7 changed files with 47 additions and 4 deletions

View File

@ -79,6 +79,7 @@ Vagrant::Config.run do |global_config|
end
""")
if __name__=="__main__":
if __name__ == "__main__":
conf = Config.load("conf.json")
conf.write_vagrant_file()

View File

@ -1,4 +1,7 @@
#!/bin/bash
set -x
# This file format was stolen from devstack <3
# This method was stolen from devstack
@ -234,7 +237,8 @@ function is_fedora {
GetOSVersion
fi
[ "$os_VENDOR" = "Fedora" ] || [ "$os_VENDOR" = "Red Hat" ] || [ "$os_VENDOR" = "CentOS" ]
[ "$os_VENDOR" = "Fedora" ] || [ "$os_VENDOR" = "Red Hat" ]\
|| [ "$os_VENDOR" = "CentOS" ] || [ "$os_VENDOR" = "CentOSStream" ]
}

View File

@ -49,6 +49,7 @@ function build_guest_image() {
# Only support ubuntu at the moment.
if [[ "${guest_os}" == "ubuntu" ]]; then
export DIB_RELEASE=${guest_release}
export DISTRO_NAME="ubuntu"
# https://cloud-images.ubuntu.com/releases is more stable than the daily
# builds (https://cloud-images.ubuntu.com/xenial/current/),
# e.g. sometimes SHA256SUMS file is missing in the daily builds website.

View File

@ -9,6 +9,8 @@
# #
###############################################################################
set -x
SCRIPT_DIRNAME=$(dirname "$0")
PATH_TROVE=${PATH_TROVE:=$(readlink -f "${SCRIPT_DIRNAME}"/../..)}
TROVESTACK_SCRIPTS=${TROVESTACK_SCRIPTS:=$(readlink -f "${SCRIPT_DIRNAME}")}
@ -126,6 +128,7 @@ else
PKG_MGR=apt-get
PKG_GET_ARGS="-y --allow-unauthenticated --force-yes -qq"
fi
PKG_INSTALL_ARG="install"
PKG_UPDATE_ARG="update"
@ -749,7 +752,13 @@ function cmd_build_image() {
echo "Ensuring we have all packages needed to build image."
sudo $HTTP_PROXY $PKG_MGR $PKG_GET_ARGS update
sudo $HTTP_PROXY $PKG_MGR $PKG_GET_ARGS install qemu git kpartx debootstrap squashfs-tools python3-pip python3-setuptools
if is_fedora; then
sudo $HTTP_PROXY $PKG_MGR $PKG_GET_ARGS install epel-release
sudo $PKG_MGR config-manager --set-enabled epel
sudo $HTTP_PROXY $PKG_MGR $PKG_GET_ARGS install qemu-img git kpartx debootstrap squashfs-tools python3-pip python3-setuptools
else
sudo $HTTP_PROXY $PKG_MGR $PKG_GET_ARGS install qemu-utils git kpartx debootstrap squashfs-tools python3-pip python3-setuptools
fi
sudo -H $HTTP_PROXY pip3 install diskimage-builder
build_guest_image ${image_guest_os} ${image_guest_release} ${dev_mode} ${guest_username} ${output}

View File

@ -430,6 +430,26 @@
dev_mode: false
image_suffix: ""
- job:
name: trove-centos8s-guest-image-build
run: playbooks/image-build/run.yaml
nodeset: trove-centos8s-single
description: |
Build Ubuntu Bionic based image only on centos8 stream.
required-projects:
- openstack/diskimage-builder
- openstack/trove
- openstack/tripleo-image-elements
files:
- ^integration/(scripts|tests)/
vars:
guest_os: ubuntu
guest_os_release: bionic
guest_username: ubuntu
branch: master
dev_mode: false
image_suffix: ""
- job:
name: publish-trove-guest-image-ubuntu-bionic
parent: publish-trove-guest-image

View File

@ -12,4 +12,10 @@
name: trove-ubuntu-focal-single
nodes:
- name: primary
label: ubuntu-focal
label: ubuntu-focal
- nodeset:
name: trove-centos8s-single
nodes:
- name: primary
label: centos-8-stream

View File

@ -18,6 +18,8 @@
voting: false
- trove-ubuntu-guest-image-build:
voting: true
- trove-centos8s-guest-image-build:
voting: true
- trove-tempest-postgres:
voting: false
- trove-tempest-ipv6-only: