diff --git a/integration/scripts/create_vm b/integration/scripts/create_vm index 7b1b376779..f02a49e68a 100755 --- a/integration/scripts/create_vm +++ b/integration/scripts/create_vm @@ -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() diff --git a/integration/scripts/functions b/integration/scripts/functions index 81802b4a68..fbbbd23f03 100644 --- a/integration/scripts/functions +++ b/integration/scripts/functions @@ -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" ] } diff --git a/integration/scripts/functions_qemu b/integration/scripts/functions_qemu index fa12027841..bd0bedbb1b 100644 --- a/integration/scripts/functions_qemu +++ b/integration/scripts/functions_qemu @@ -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. diff --git a/integration/scripts/trovestack b/integration/scripts/trovestack index 0045fff574..3e50194ff9 100755 --- a/integration/scripts/trovestack +++ b/integration/scripts/trovestack @@ -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} diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 2decd52695..4529eda9d4 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -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 diff --git a/zuul.d/nodesets.yaml b/zuul.d/nodesets.yaml index 88688f9c95..848f834077 100644 --- a/zuul.d/nodesets.yaml +++ b/zuul.d/nodesets.yaml @@ -12,4 +12,10 @@ name: trove-ubuntu-focal-single nodes: - name: primary - label: ubuntu-focal \ No newline at end of file + label: ubuntu-focal + +- nodeset: + name: trove-centos8s-single + nodes: + - name: primary + label: centos-8-stream \ No newline at end of file diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml index 0628d05140..672fe3c3d1 100644 --- a/zuul.d/projects.yaml +++ b/zuul.d/projects.yaml @@ -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: