From: Thanh Ha Date: Fri, 16 Mar 2018 18:47:18 +0000 (-0400) Subject: Add support for VolumeFromImage boot source X-Git-Tag: v0.18.0~22 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=841f374326218a5aaa52ab711ccd18f0aeea32b9;p=releng%2Fglobal-jjb.git Add support for VolumeFromImage boot source Allows us the ability to configure a volume size for images. This feature requires OpenStack Cloud Plugin 2.32 to use. Change-Id: Ic557373c16afc3df3af3571e5f3883f5b18e8e8c Signed-off-by: Thanh Ha --- diff --git a/docs/jjb/lf-ci-jobs.rst b/docs/jjb/lf-ci-jobs.rst index 1a31b751..8b1324a9 100644 --- a/docs/jjb/lf-ci-jobs.rst +++ b/docs/jjb/lf-ci-jobs.rst @@ -179,6 +179,7 @@ OpenStack Cloud plugin version supported: * 2.30 * 2.31 +* 2.32 Cloud configuration are managed via a directory structure in ci-management as follows: diff --git a/shell/jenkins-configure-clouds.sh b/shell/jenkins-configure-clouds.sh index ab7f9098..a04c16ca 100644 --- a/shell/jenkins-configure-clouds.sh +++ b/shell/jenkins-configure-clouds.sh @@ -123,6 +123,7 @@ get_minion_options() { flavors["v2-highcpu-32"]="21dfb8a3-c472-4a2c-a8e1-4da8de415ff8" image_name=$(get_cfg "$cfg_file" IMAGE_NAME "") + volume_size=$(get_cfg "$cfg_file" VOLUME_SIZE "") hardware_id=$(get_cfg "$cfg_file" HARDWARE_ID "") network_id=$(get_cfg "$cfg_file" NETWORK_ID "") user_data_id=$(get_cfg "$cfg_file" USER_DATA_ID "jenkins-init-script") @@ -143,7 +144,11 @@ get_minion_options() { fs_root=$(get_cfg "$cfg_file" FS_ROOT "/w") retention_time=$(get_cfg "$cfg_file" RETENTION_TIME "0") - echo " new BootSource.Image(\"$image_name\")," + if [ ! -z "$volume_size" ]; then + echo " new BootSource.VolumeFromImage(\"$image_name\", $volume_size)," + else + echo " new BootSource.Image(\"$image_name\")," + fi echo " \"${flavors[${hardware_id}]}\"," echo " \"$network_id\"," echo " \"$user_data_id\","