git: 96e76036949f - releng/14.0 - releng-azure: Add ZFS support to Azure image buliding and uploading
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 18 Oct 2023 19:17:54 UTC
The branch releng/14.0 has been updated by lwhsu:
URL: https://cgit.FreeBSD.org/src/commit/?id=96e76036949fffb7f02a423cca6589873966b503
commit 96e76036949fffb7f02a423cca6589873966b503
Author: Li-Wen Hsu <lwhsu@FreeBSD.org>
AuthorDate: 2023-08-29 17:40:39 +0000
Commit: Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2023-10-18 19:17:25 +0000
releng-azure: Add ZFS support to Azure image buliding and uploading
Approved by: gjb (re), delphij (re)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41454
(cherry picked from commit 78f901dcbd84ccad3849a8029f2320cf97079856)
(cherry picked from commit 1e7218e33974089234841420bb69777a29a91c61)
---
release/Makefile.azure | 18 +++++++++++-------
release/Makefile.vm | 2 +-
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/release/Makefile.azure b/release/Makefile.azure
index 528371ad076e..a8f59282a09c 100644
--- a/release/Makefile.azure
+++ b/release/Makefile.azure
@@ -4,7 +4,6 @@
# Makefile for uploading Microsoft Azure disk images.
#
-AZURE_IMG?= ${.OBJDIR}/azure.vhdf
AZURE_UPLOAD_TGTS= azure-check-depends \
azure-do-upload
CLEANFILES+= ${AZURE_UPLOAD_TGTS}
@@ -19,8 +18,6 @@ AZURE${VAR}!= grep -E '^AZURE${VAR}' ${AZURE_UPLOAD_CONF} | awk -F ' ' '{print $
SNAPSHOT_DATE!= date +-${BUILDDATE}
.endif
-AZURE_TARGET:= ${OSRELEASE}${SNAPSHOT_DATE}
-
START_DATE!= date -v-1d -I -u
EXPIRY_DATE!= date -v+1m -I -u
@@ -44,14 +41,18 @@ azure-check-depends:
. endif
.endif
-azure-do-upload:
+.for _FS in ${AZURE_FSLIST}
+AZURE_IMG_${_FS}= ${.OBJDIR}/azure.${_FS}.vhdf
+AZURE_TARGET_${_FS}= ${OSRELEASE}-${_FS}${SNAPSHOT_DATE}
+
+azure-do-upload-${_FS}:
/usr/local/bin/az storage blob upload \
--account-name ${AZURE_ACCOUNT} --account-key ${AZURE_KEY} \
--container-name ${AZURE_STORAGE} --type page \
- --file ${AZURE_IMG} --name ${AZURE_TARGET}.vhd
+ --file ${AZURE_IMG_${_FS}} --name ${AZURE_TARGET_${_FS}}.vhd
@echo "The disk access URL with shared access signature is:"
@echo
- @echo -n https://${AZURE_ACCOUNT}.blob.core.windows.net/${AZURE_STORAGE}/${AZURE_TARGET}.vhd?
+ @echo -n https://${AZURE_ACCOUNT}.blob.core.windows.net/${AZURE_STORAGE}/${AZURE_TARGET_${_FS}}.vhd?
@/usr/local/bin/az storage container generate-sas \
--account-name ${AZURE_ACCOUNT} --account-key ${AZURE_KEY} \
--name ${AZURE_STORAGE} \
@@ -67,5 +68,8 @@ azure-do-upload:
@echo
@echo /usr/local/bin/az storage blob delete \
--account-name ${AZURE_ACCOUNT} --account-key ${AZURE_KEY} \
- --container-name ${AZURE_STORAGE} --name ${AZURE_TARGET}.vhd
+ --container-name ${AZURE_STORAGE} --name ${AZURE_TARGET_${_FS}}.vhd
@echo
+.endfor
+
+azure-do-upload: azure-do-upload-${VMFS}
diff --git a/release/Makefile.vm b/release/Makefile.vm
index 09e31e3c0b6f..e1bba5271a4c 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -23,7 +23,7 @@ CLOUDWARE_TYPES?= BASIC-CI \
OCI \
VAGRANT
AZURE_FORMAT= vhdf
-AZURE_FSLIST= ufs
+AZURE_FSLIST= ufs zfs
AZURE_DESC= Microsoft Azure platform image
BASIC-CI_FORMAT= raw
BASIC-CI_FSLIST= ufs