aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi-Wen Hsu <lwhsu@FreeBSD.org>2023-08-29 17:40:39 +0000
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2023-10-15 17:14:56 +0000
commit1e7218e33974089234841420bb69777a29a91c61 (patch)
treea8cb4f0ead8d83f72c189a5302b6689fd0644b75
parent80496f42b6a9c13664f6228602fd21bf7a4500a5 (diff)
downloadsrc-1e7218e33974089234841420bb69777a29a91c61.tar.gz
src-1e7218e33974089234841420bb69777a29a91c61.zip
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 (cherry picked from commit 78f901dcbd84ccad3849a8029f2320cf97079856)
-rw-r--r--release/Makefile.azure18
-rw-r--r--release/Makefile.vm2
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