test.ps1 566 Bytes
Newer Older
Stefan Scherer's avatar
Stefan Scherer committed
1 2
$ErrorActionPreference = 'Stop'

Stefan Scherer's avatar
Stefan Scherer committed
3 4 5 6 7 8 9 10
"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"
11
$env:AWS_S3_BUCKET="dummy"
Stefan Scherer's avatar
Stefan Scherer committed
12

Stefan Scherer's avatar
Stefan Scherer committed
13 14 15 16
$files = @(Get-ChildItem *.json)

foreach ($file in $files) {
  Write-Host "`n`nValidate $file"
Stefan Scherer's avatar
Stefan Scherer committed
17 18 19 20 21
  packer.exe validate $file
  if (-not $?)
  {
     throw "Packer validate found errors in $file!"
  }
Stefan Scherer's avatar
Stefan Scherer committed
22
}