diff --git a/changelog/changes/2022-02-22-configurable-image-compression.md b/changelog/changes/2022-02-22-configurable-image-compression.md new file mode 100644 index 0000000000..a06c7a31eb --- /dev/null +++ b/changelog/changes/2022-02-22-configurable-image-compression.md @@ -0,0 +1,2 @@ +- Image compression format is now configurable. Supported formats are: bz2, gz, zip, none. Selecting the image format can now be done by passing the ```--image_compression_format``` option to ```image_to_vm.sh``` +- The Jenkins ```vms.sh``` script sets the image compression format to ```gz``` for OpenStack images, which allows Glance to directly consume the images by simply passing in the URL of the image. diff --git a/jenkins/vms.sh b/jenkins/vms.sh index 4beb63653e..06e3972eb2 100755 --- a/jenkins/vms.sh +++ b/jenkins/vms.sh @@ -113,6 +113,12 @@ for FORMAT in ${FORMATS}; do UPLOAD_ROOT=${UPLOAD_PRIVATE_ROOT} fi + COMPRESSION_FORMAT="bz2" + + if [[ "${FORMAT}" =~ ^(openstack|openstack_mini)$ ]];then + COMPRESSION_FORMAT="gz" + fi + script image_to_vm.sh \ --board="${BOARD}" \ --format="${FORMAT}" \ @@ -124,6 +130,7 @@ for FORMAT in ${FORMATS}; do --sign_digests="${SIGNING_USER}" \ --download_root="${DOWNLOAD_ROOT}" \ --upload_root="${UPLOAD_ROOT}" \ + --image_compression_format="${COMPRESSION_FORMAT}" --upload \ ${PRIVATE_UPLOAD_OPT} done