Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
init-sig.sh: allow full image definition name customization
Browse files Browse the repository at this point in the history
With Flatcar we would like to use different naming scheme as discussed
in flatcar/Flatcar#734, so this change
enables that. It brings no functional changes.

Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
  • Loading branch information
invidian committed Jul 5, 2022
1 parent 7047bc3 commit c762dea
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions images/capi/packer/azure/scripts/init-sig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ create_image_definition() {
az sig image-definition create \
--resource-group ${RESOURCE_GROUP_NAME} \
--gallery-name ${GALLERY_NAME} \
--gallery-image-definition capi-${1} \
--gallery-image-definition ${1} \
--publisher capz \
--offer capz-demo \
--sku ${2} \
Expand All @@ -34,38 +34,38 @@ SIG_TARGET=$1

case ${SIG_TARGET} in
ubuntu-1804)
create_image_definition ${SIG_TARGET} "18.04-LTS" "V1" "Linux"
create_image_definition capi-${SIG_TARGET} "18.04-LTS" "V1" "Linux"
;;
ubuntu-2004)
create_image_definition ${SIG_TARGET} "20_04-lts" "V1" "Linux"
create_image_definition capi-${SIG_TARGET} "20_04-lts" "V1" "Linux"
;;
centos-7)
create_image_definition "centos-7.7" "centos-7.7" "V1" "Linux"
create_image_definition "capi-centos-7.7" "centos-7.7" "V1" "Linux"
;;
windows-2019)
create_image_definition "windows-2019-docker-ee" "win-2019-docker-ee" "V1" "Windows"
create_image_definition "capi-windows-2019-docker-ee" "win-2019-docker-ee" "V1" "Windows"
;;
windows-2019-containerd)
create_image_definition ${SIG_TARGET} "win-2019-containerd" "V1" "Windows"
create_image_definition capi-${SIG_TARGET} "win-2019-containerd" "V1" "Windows"
;;
windows-2022-containerd)
create_image_definition ${SIG_TARGET} "win-2022-containerd" "V1" "Windows"
create_image_definition capi-${SIG_TARGET} "win-2022-containerd" "V1" "Windows"
;;
flatcar)
SKU="flatcar-${FLATCAR_CHANNEL}-${FLATCAR_VERSION}"
SKU="capi-flatcar-${FLATCAR_CHANNEL}-${FLATCAR_VERSION}"
create_image_definition ${SKU} ${SKU} "V1" "Linux"
;;
ubuntu-1804-gen2)
create_image_definition ${SIG_TARGET} "18.04-lts-gen2" "V2" "Linux"
create_image_definition capi-${SIG_TARGET} "18.04-lts-gen2" "V2" "Linux"
;;
ubuntu-2004-gen2)
create_image_definition ${SIG_TARGET} "20_04-lts-gen2" "V2" "Linux"
create_image_definition capi-${SIG_TARGET} "20_04-lts-gen2" "V2" "Linux"
;;
centos-7-gen2)
create_image_definition "centos-7.7-gen2" "centos-7.7-gen2" "V2" "Linux"
create_image_definition "capi-centos-7.7-gen2" "centos-7.7-gen2" "V2" "Linux"
;;
flatcar-gen2)
SKU="flatcar-${FLATCAR_CHANNEL}-${FLATCAR_VERSION}-gen2"
SKU="capi-flatcar-${FLATCAR_CHANNEL}-${FLATCAR_VERSION}-gen2"
create_image_definition "${SKU}" "${SKU}" "V2" "Linux"
;;
*)
Expand Down

0 comments on commit c762dea

Please sign in to comment.