Add ubuntu focal support for trove guest image

story: 2009996
task: 45072
Change-Id: Ib3613119dc136c8a0d96a27c52e0bc1874065775
This commit is contained in:
wu.chunyang 2022-04-18 22:48:57 +08:00
parent 4d8e55c5fe
commit 2f8f2f8d92
4 changed files with 16 additions and 6 deletions

View File

@ -1,4 +1,11 @@
{
"release": {
"ubuntu": {
"focal": {
"ureadahead": ""
}
}
},
"family": {
"redhat": {
"guest-agent": "openstack-trove-guest-agent",

View File

@ -54,9 +54,12 @@ function build_guest_image() {
# builds (https://cloud-images.ubuntu.com/xenial/current/),
# e.g. sometimes SHA256SUMS file is missing in the daily builds website.
# Ref: diskimage_builder/elements/ubuntu/root.d/10-cache-ubuntu-tarball
declare -A image_file_mapping=( ["xenial"]="ubuntu-16.04-server-cloudimg-amd64-root.tar.gz" ["bionic"]="ubuntu-18.04-server-cloudimg-amd64.squashfs" )
export DIB_CLOUD_IMAGES="https://cloud-images.ubuntu.com/releases/${DIB_RELEASE}/release/"
export BASE_IMAGE_FILE=${image_file_mapping[${DIB_RELEASE}]}
if [[ "${DIB_RELEASE}" != "focal" ]]; then
#TODO(wuchunyang): we need remove the support of xenial and bionic.
declare -A image_file_mapping=( ["xenial"]="ubuntu-16.04-server-cloudimg-amd64-root.tar.gz" ["bionic"]="ubuntu-18.04-server-cloudimg-amd64.squashfs" )
export DIB_CLOUD_IMAGES="https://cloud-images.ubuntu.com/releases/${DIB_RELEASE}/release/"
export BASE_IMAGE_FILE=${image_file_mapping[${DIB_RELEASE}]}
fi
elementes="$elementes ubuntu-minimal"
fi

View File

@ -767,7 +767,7 @@ function cmd_build_image() {
# Build guest image and upload to Glance, register the datastore and configuration parameters.
function cmd_build_and_upload_image() {
local guest_os=${1:-"ubuntu"}
local guest_release=${2:-"bionic"}
local guest_release=${2:-"focal"}
local dev_mode=${3:-"true"}
local guest_username=${4:-"ubuntu"}
local output_dir=${5:-"$HOME/images"}

View File

@ -424,7 +424,7 @@
- ^integration/(scripts|tests)/
vars:
guest_os: ubuntu
guest_os_release: bionic
guest_os_release: focal
guest_username: ubuntu
branch: master
dev_mode: false
@ -444,7 +444,7 @@
- ^integration/(scripts|tests)/
vars:
guest_os: ubuntu
guest_os_release: bionic
guest_os_release: focal
guest_username: ubuntu
branch: master
dev_mode: false