Add the new OEM type, and selective upload azure as private

Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
This commit is contained in:
Sayan Chowdhury 2020-09-14 17:27:03 +05:30
parent a22f316c23
commit cc147a1255
No known key found for this signature in database
GPG Key ID: B02399319CD05C8B
3 changed files with 17 additions and 1 deletions

View File

@ -22,6 +22,8 @@ DEFINE_boolean parallel ${FLAGS_TRUE} \
"Enable parallelism in gsutil." "Enable parallelism in gsutil."
DEFINE_boolean upload ${UPLOAD_DEFAULT} \ DEFINE_boolean upload ${UPLOAD_DEFAULT} \
"Upload all packages/images via gsutil." "Upload all packages/images via gsutil."
DEFINE_boolean private ${FLAGS_TRUE} \
"Upload the image as a private object."
DEFINE_string upload_root "${FLATCAR_UPLOAD_ROOT}" \ DEFINE_string upload_root "${FLATCAR_UPLOAD_ROOT}" \
"Upload prefix, board/version/etc will be appended. Must be a gs:// URL." "Upload prefix, board/version/etc will be appended. Must be a gs:// URL."
DEFINE_string upload_path "" \ DEFINE_string upload_path "" \

View File

@ -36,6 +36,7 @@ VALID_IMG_TYPES=(
digitalocean digitalocean
exoscale exoscale
azure azure
azure_premium
hyperv hyperv
niftycloud niftycloud
cloudsigma cloudsigma
@ -270,6 +271,11 @@ IMG_azure_DISK_FORMAT=vhd
IMG_azure_DISK_LAYOUT=azure IMG_azure_DISK_LAYOUT=azure
IMG_azure_OEM_PACKAGE=oem-azure IMG_azure_OEM_PACKAGE=oem-azure
## azure premium
IMG_azure_premium_DISK_FORMAT=vhd
IMG_azure_premium_DISK_LAYOUT=azure
IMG_azure_premium_OEM_PACKAGE=oem-azure
## hyper-v ## hyper-v
IMG_hyperv_DISK_FORMAT=vhd IMG_hyperv_DISK_FORMAT=vhd
IMG_hyperv_OEM_PACKAGE=oem-hyperv IMG_hyperv_OEM_PACKAGE=oem-hyperv

View File

@ -43,6 +43,13 @@ img=src/flatcar_production_image.bin
[[ "${img}.bz2" -nt "${img}" ]] && [[ "${img}.bz2" -nt "${img}" ]] &&
enter lbunzip2 -k -f "/mnt/host/source/${img}.bz2" enter lbunzip2 -k -f "/mnt/host/source/${img}.bz2"
PRIVATE_UPLOAD_OPT=""
if [[ "${FORMAT}" == 'azure_premium' ]]
then
PRIVATE_UPLOAD_OPT="--private"
UPLOAD_ROOT=${UPLOAD_PRIVATE_ROOT}
fi
script image_to_vm.sh \ script image_to_vm.sh \
--board="${BOARD}" \ --board="${BOARD}" \
--format="${FORMAT}" \ --format="${FORMAT}" \
@ -54,4 +61,5 @@ script image_to_vm.sh \
--sign_digests="${SIGNING_USER}" \ --sign_digests="${SIGNING_USER}" \
--download_root="${DOWNLOAD_ROOT}" \ --download_root="${DOWNLOAD_ROOT}" \
--upload_root="${UPLOAD_ROOT}" \ --upload_root="${UPLOAD_ROOT}" \
--upload --upload \
${PRIVATE_UPLOAD_OPT}