mirror of
https://github.com/actions/runner-images.git
synced 2025-12-10 19:16:48 +00:00
[windows] Change packer templates from json to hcl (#8999)
This commit is contained in:
committed by
GitHub
parent
126c302e7a
commit
ea64263b41
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" `
|
||||
|
||||
Reference in New Issue
Block a user