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 /integration/scripts | |
parent | a5ddadddeda20211dca1bc7420d65c1adb95be16 (diff) | |
download | trove-4d8e55c5fe0cddaa62008c105d37c5349323f366.tar.gz |
Add image build test on Centos8 stream
build image on Centos8 stream
Change-Id: I759d482430eaf0e9304986c9fad047cbd44c09ca
Diffstat (limited to 'integration/scripts')
-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 |
4 files changed, 18 insertions, 3 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} |