forked from StefanScherer/packer-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.ps1
More file actions
22 lines (19 loc) · 641 Bytes
/
test.ps1
File metadata and controls
22 lines (19 loc) · 641 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$ErrorActionPreference = 'Stop'
"dummy" | Out-File path-to.vmx
$env:PACKER_AZURE_AD_TENANT_ID="dummy"
$env:PACKER_AZURE_SUBSCRIPTION_ID="dummy"
$env:PACKER_AZURE_OBJECT_ID="dummy"
$env:PACKER_AZURE_APP_ID="dummy"
$env:PACKER_AZURE_CLIENT_SECRET="dummy"
$env:PACKER_AZURE_RESOURCE_GROUP="dummy"
$env:PACKER_AZURE_STORAGE_ACCOUNT="dummy"
$env:AWS_S3_BUCKET="dummy"
$files = @(Get-ChildItem *.json | Where-Object -FilterScript { $_.Name -ne "windows_7.json" })
foreach ($file in $files) {
Write-Host "`n`nValidate $file"
packer.exe validate -except=qemu $file
if (-not $?)
{
throw "Packer validate found errors in $file!"
}
}