From a27099b057088cccb69d429784107ca43e964a43 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Wed, 4 May 2022 11:19:49 +0200 Subject: [PATCH] Add Ubuntu2204 ImageType (#5476) * Add Ubuntu2204 ImageType * Update json path --- docs/create-image-and-azure-resources.md | 2 +- helpers/GenerateResourcesAndImage.ps1 | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/create-image-and-azure-resources.md b/docs/create-image-and-azure-resources.md index ae25ed00..2727d730 100644 --- a/docs/create-image-and-azure-resources.md +++ b/docs/create-image-and-azure-resources.md @@ -61,7 +61,7 @@ Where: - `SubscriptionId` - The Azure subscription Id where resources will be created. - `ResourceGroupName` - The Azure resource group name where the Azure resources will be created. - `ImageGenerationRepositoryRoot` - The root path of the image generation repository source. -- `ImageType` - The type of the image being generated. Valid options are: "Windows2016", "Windows2019", "Windows2022", "Ubuntu1804", "Ubuntu2004". +- `ImageType` - The type of the image being generated. Valid options are: "Windows2016", "Windows2019", "Windows2022", "Ubuntu1804", "Ubuntu2004", "Ubuntu2204". - `AzureLocation` - The location of the resources being created in Azure. For example "East US". The function automatically creates all required Azure resources and kicks off packer image generation for the selected image type. diff --git a/helpers/GenerateResourcesAndImage.ps1 b/helpers/GenerateResourcesAndImage.ps1 index 36515dcd..92165001 100644 --- a/helpers/GenerateResourcesAndImage.ps1 +++ b/helpers/GenerateResourcesAndImage.ps1 @@ -6,6 +6,7 @@ enum ImageType { Windows2022 = 2 Ubuntu1804 = 3 Ubuntu2004 = 4 + Ubuntu2204 = 5 } Function Get-PackerTemplatePath { @@ -32,6 +33,9 @@ Function Get-PackerTemplatePath { ([ImageType]::Ubuntu2004) { $relativeTemplatePath = Join-Path "linux" "ubuntu2004.json" } + ([ImageType]::Ubuntu2204) { + $relativeTemplatePath = Join-Path "linux" "ubuntu2204.json" + } default { throw "Unknown type of image" } }