Merge pull request #93 from flatcar-linux/sayan/azure-seperate-build

Add Azure OEM and selective private upload
This commit is contained in:
Sayan Chowdhury 2020-09-21 19:55:23 +05:30 committed by GitHub
commit e66c89ef31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 1 deletions

View File

@ -22,6 +22,8 @@ DEFINE_boolean parallel ${FLAGS_TRUE} \
"Enable parallelism in gsutil."
DEFINE_boolean upload ${UPLOAD_DEFAULT} \
"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}" \
"Upload prefix, board/version/etc will be appended. Must be a gs:// URL."
DEFINE_string upload_path "" \

View File

@ -36,6 +36,7 @@ VALID_IMG_TYPES=(
digitalocean
exoscale
azure
azure_premium
hyperv
niftycloud
cloudsigma
@ -270,6 +271,11 @@ IMG_azure_DISK_FORMAT=vhd
IMG_azure_DISK_LAYOUT=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
IMG_hyperv_DISK_FORMAT=vhd
IMG_hyperv_OEM_PACKAGE=oem-hyperv

View File

@ -43,6 +43,13 @@ img=src/flatcar_production_image.bin
[[ "${img}.bz2" -nt "${img}" ]] &&
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 \
--board="${BOARD}" \
--format="${FORMAT}" \
@ -54,4 +61,5 @@ script image_to_vm.sh \
--sign_digests="${SIGNING_USER}" \
--download_root="${DOWNLOAD_ROOT}" \
--upload_root="${UPLOAD_ROOT}" \
--upload
--upload \
${PRIVATE_UPLOAD_OPT}