Skip to content

Commit

Permalink
feat: add tags for skipping policy when building Windows VHD (#4674)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiqianTao authored Jul 22, 2024
1 parent 2e14f7b commit ca8b893
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 7 additions & 4 deletions vhdbuilder/packer/configure-windows-vhd.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -812,11 +812,14 @@ function Log-ReofferUpdate {

function Test-AzureExtensions {
# Expect the Windows VHD without any other extensions
$actualExtensions = (Get-ChildItem "C:\Packages\Plugins").Name
if ($actualExtensions.Length -gt 0) {
Write-Log "Azure extensions are not expected. Details: $($actualExtensions | Out-String)"
exit 1
if (Test-Path "C:\Packages\Plugins") {
$actualExtensions = (Get-ChildItem "C:\Packages\Plugins").Name
if ($actualExtensions.Length -gt 0) {
Write-Log "Azure extensions are not expected. Details: $($actualExtensions | Out-String)"
exit 1
}
}
Write-Log "Azure extensions are not found"
}

# Disable progress writers for this session to greatly speed up operations such as Invoke-WebRequest
Expand Down
5 changes: 4 additions & 1 deletion vhdbuilder/packer/windows-vhd-builder-sig.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@
"os": "Windows",
"now": "{{user `create_time`}}",
"createdBy": "aks-vhd-pipeline",
"SkipASMAzSecPack": "True"
"SkipASMAzSecPack": "True",
"SkipASMAV": "True",
"SkipCIExtensionAudit": "True",
"SkipCIEmergency": "True"
},
"virtual_network_resource_group_name": "{{user `vnet_resource_group_name`}}",
"virtual_network_name": "{{user `vnet_name`}}",
Expand Down

0 comments on commit ca8b893

Please sign in to comment.