The branch main has been updated by lwhsu:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=78f901dcbd84ccad3849a8029f2320cf97079856

commit 78f901dcbd84ccad3849a8029f2320cf97079856
Author:     Li-Wen Hsu <lw...@freebsd.org>
AuthorDate: 2023-08-29 17:40:39 +0000
Commit:     Li-Wen Hsu <lw...@freebsd.org>
CommitDate: 2023-08-29 17:40:39 +0000

    releng-azure: Add ZFS support to Azure image buliding and uploading
    
    Approved by:    gjb (re)
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D41454
---
 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 fb00804a81ec..a5d194cc2678 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -24,7 +24,7 @@ CLOUDWARE?=   BASIC-CI \
                VAGRANT-VIRTUALBOX \
                VAGRANT-VMWARE
 AZURE_FORMAT=  vhdf
-AZURE_FSLIST=  ufs
+AZURE_FSLIST=  ufs zfs
 AZURE_DESC=    Microsoft Azure platform image
 AZURE_DISK=    ${OSRELEASE}.${AZURE_FORMAT}
 BASIC-CI_FORMAT=       raw

Reply via email to