GCE: Add TARGET and FS to image family
GCE image family is meant to be unique per set of image characteristics so that a user can create instances using the image family instead of the image name to reliably get a similar image with updated software, but no other changes. Without this change, the instances create API would select the most recent non-deprecated image matching the name, regardless of architecture or filesystem.
This commit is contained in:
committed by
Colin Percival
parent
4872b48b17
commit
fc83e6c5e1
@@ -16,7 +16,7 @@ GCE_BUCKET?=
|
||||
GCE_LICENSE?=
|
||||
|
||||
.if !defined(GCE_FAMILY) || empty(GCE_FAMILY)
|
||||
GCE_FAMILY= ${TYPE:tl}-${REVISION:S,.,-,}
|
||||
GCE_FAMILY= ${TYPE:tl}-${REVISION:S,.,-,}-${TARGET}
|
||||
.endif
|
||||
|
||||
.if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" || ${BRANCH} == "PRERELEASE"
|
||||
@@ -74,7 +74,7 @@ gce-do-upload-${_FS}:
|
||||
/usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET_${_FS}}.tar.gz \
|
||||
gs://${GCE_BUCKET}/
|
||||
/usr/local/bin/gcloud compute images create ${GCE_TARGET_${_FS}} \
|
||||
--family=${GCE_FAMILY}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \
|
||||
--family=${GCE_FAMILY}-${_FS}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \
|
||||
--guest-os-features=GVNIC,UEFI_COMPATIBLE \
|
||||
--source-uri gs://${GCE_BUCKET}/${GCE_TARGET_${_FS}}.tar.gz
|
||||
touch ${.OBJDIR}/${.TARGET}
|
||||
|
||||
Reference in New Issue
Block a user