diff options
author | wu.chunyang <wuchunyang@yovole.com> | 2022-04-15 21:05:55 +0800 |
---|---|---|
committer | wu.chunyang <wuchunyang@yovole.com> | 2022-04-17 16:53:52 +0800 |
commit | 4d8e55c5fe0cddaa62008c105d37c5349323f366 (patch) | |
tree | 51d8a5959e45a123de1e56fa45d3ac044726be72 | |
parent | a5ddadddeda20211dca1bc7420d65c1adb95be16 (diff) | |
download | trove-4d8e55c5fe0cddaa62008c105d37c5349323f366.tar.gz |
Add image build test on Centos8 stream
build image on Centos8 stream
Change-Id: I759d482430eaf0e9304986c9fad047cbd44c09ca
-rwxr-xr-x | integration/scripts/create_vm | 3 | ||||
-rw-r--r-- | integration/scripts/functions | 6 | ||||
-rw-r--r-- | integration/scripts/functions_qemu | 1 | ||||
-rwxr-xr-x | integration/scripts/trovestack | 11 | ||||
-rw-r--r-- | zuul.d/jobs.yaml | 20 | ||||
-rw-r--r-- | zuul.d/nodesets.yaml | 8 | ||||
-rw-r--r-- | zuul.d/projects.yaml | 2 |
7 files changed, 47 insertions, 4 deletions
diff --git a/integration/scripts/create_vm b/integration/scripts/create_vm index 7b1b3767..f02a49e6 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 81802b4a..fbbbd23f 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 fa120278..bd0bedbb 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 0045fff5..3e50194f 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 2decd526..4529eda9 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -431,6 +431,26 @@ 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 description: | diff --git a/zuul.d/nodesets.yaml b/zuul.d/nodesets.yaml index 88688f9c..848f8340 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 0628d051..672fe3c3 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: |