From e145f2fa368b6afa58050062afd64b50d1d330bf Mon Sep 17 00:00:00 2001 From: garfthoffman <109185460+garfthoffman@users.noreply.github.com> Date: Wed, 20 Sep 2023 12:06:52 -0400 Subject: [PATCH] add boolean to control when to run anka push during clean generation (#8305) --- images.CI/macos/anka/CreateCleanAnkaTemplate.ps1 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/images.CI/macos/anka/CreateCleanAnkaTemplate.ps1 b/images.CI/macos/anka/CreateCleanAnkaTemplate.ps1 index d3624798f..676e6c5f7 100644 --- a/images.CI/macos/anka/CreateCleanAnkaTemplate.ps1 +++ b/images.CI/macos/anka/CreateCleanAnkaTemplate.ps1 @@ -19,6 +19,7 @@ param( [string] $TemplateName, [bool] $DownloadLatestVersion = $true, + [bool] $PushToRegistry = $true, [bool] $BetaSearch = $false, [bool] $InstallSoftwareUpdate = $true, [bool] $EnableAutoLogon = $true, @@ -204,6 +205,8 @@ Set-AnkaVMVideoController -VMName $TemplateName -ShortMacOSVersion $ShortMacOSVe Write-Host "`t[*] Setting screen resolution to $DisplayResolution for $TemplateName" Set-AnkaVMDisplayResolution -VMName $TemplateName -DisplayResolution $DisplayResolution -# Push a VM template (and tag) to the Cloud -Write-Host "`t[*] Pushing '$TemplateName' image with '$TagName' tag to the '$RegistryUrl' registry..." -Push-AnkaTemplateToRegistry -RegistryUrl $registryUrl -TagName $TagName -TemplateName $TemplateName +if ($PushToRegistry) { + # Push a VM template (and tag) to the Cloud + Write-Host "`t[*] Pushing '$TemplateName' image with '$TagName' tag to the '$RegistryUrl' registry..." + Push-AnkaTemplateToRegistry -RegistryUrl $registryUrl -TagName $TagName -TemplateName $TemplateName +}