diff --git a/eng/pipelines/azure-pipelines.yml b/eng/pipelines/azure-pipelines.yml index 5850f2ee702..d6653237165 100644 --- a/eng/pipelines/azure-pipelines.yml +++ b/eng/pipelines/azure-pipelines.yml @@ -105,6 +105,8 @@ resources: extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates parameters: + settings: + networkIsolationPolicy: Permissive,CFSClean,CFSClean2 featureFlags: autoEnablePREfastWithNewRuleset: false autoEnableRoslynWithNewRuleset: false diff --git a/eng/pipelines/templates/prepare-winget-manifest.yml b/eng/pipelines/templates/prepare-winget-manifest.yml index 386837a2749..26231ea2da3 100644 --- a/eng/pipelines/templates/prepare-winget-manifest.yml +++ b/eng/pipelines/templates/prepare-winget-manifest.yml @@ -57,9 +57,19 @@ steps: displayName: 🟣Set version ${{ parameters.version }} - pwsh: | - Write-Host "Installing Microsoft.WinGet.Client from PSGallery..." - Install-PSResource -Name Microsoft.WinGet.Client -Repository PSGallery -TrustRepository + $repoName = 'dotnet-public' + $repoUri = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json' + Write-Host "Ensuring PSResource repository '$repoName' is registered..." + $existingRepo = Get-PSResourceRepository -Name $repoName -ErrorAction SilentlyContinue + if ($null -eq $existingRepo) { + Register-PSResourceRepository -Name $repoName -Uri $repoUri -Trusted + } else { + Write-Host "PSResource repository '$repoName' is already registered. Skipping registration." + } + + Write-Host "Installing Microsoft.WinGet.Client from $repoName feed..." + Install-PSResource -Name Microsoft.WinGet.Client -Repository $repoName -TrustRepository Write-Host "Microsoft.WinGet.Client installed. Listing installed version:" Get-Module -ListAvailable Microsoft.WinGet.Client | Select-Object Name, Version | Format-Table