[windows] Change packer templates from json to hcl (#8999)

This commit is contained in:
Shamil Mubarakshin
2023-12-13 09:17:44 +01:00
committed by GitHub
parent 126c302e7a
commit ea64263b41
9 changed files with 919 additions and 735 deletions

View File

@@ -18,4 +18,4 @@ jobs:
parameters:
image_type: windows2019
image_readme_name: Windows2019-Readme.md
image_template_name: windows-2019.json
image_template_name: windows-2019.pkr.hcl

View File

@@ -18,4 +18,4 @@ jobs:
parameters:
image_type: windows2022
image_readme_name: Windows2022-Readme.md
image_template_name: windows-2022.json
image_template_name: windows-2022.pkr.hcl

View File

@@ -22,8 +22,6 @@ if (-not (Test-Path $TemplatePath))
$ImageTemplateName = [io.path]::GetFileName($TemplatePath).Split(".")[0]
$InstallPassword = [System.GUID]::NewGuid().ToString().ToUpper()
packer validate -syntax-only $TemplatePath
$SensitiveData = @(
'OSType',
'StorageAccountLocation',
@@ -37,6 +35,12 @@ $SensitiveData = @(
Write-Host "Show Packer Version"
packer --version
Write-Host "Download packer plugins"
packer init $TemplatePath
Write-Host "Validate packer template"
packer validate -syntax-only $TemplatePath
Write-Host "Build $ImageTemplateName VM"
packer build -var "client_id=$ClientId" `
-var "client_secret=$ClientSecret" `