Packer build now generates log file in build.ps1

This commit is contained in:
Chris Long
2019-05-03 22:53:20 -07:00
committed by GitHub
parent 5a6c5408b0
commit f7e0765185

View File

@@ -245,6 +245,8 @@ function packer_build_box {
$CurrentDir = Get-Location $CurrentDir = Get-Location
Set-Location "$DL_DIR\Packer" Set-Location "$DL_DIR\Packer"
Write-Output "Using Packer to build the $BOX Box. This can take 90-180 minutes depending on bandwidth and hardware." Write-Output "Using Packer to build the $BOX Box. This can take 90-180 minutes depending on bandwidth and hardware."
$env:PACKER_LOG=1
$env:PACKER_LOG_PATH="$DL_DIR\Packer"
&$PackerPath @('build', "--only=$PackerProvider-iso", "$box.json") &$PackerPath @('build', "--only=$PackerProvider-iso", "$box.json")
Write-Host "[packer_build_box] Finished for $Box. Got exit code: $LASTEXITCODE" Write-Host "[packer_build_box] Finished for $Box. Got exit code: $LASTEXITCODE"