You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
2
+
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
3
+
#
4
+
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
5
+
# under <packageSourceCredentials> for each Maestro managed private feed. Two additional credential
6
+
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
7
+
#
8
+
# This script needs to be called in every job that will restore packages and which the base repo has
9
+
# private AzDO feeds in the NuGet.config.
10
+
#
11
+
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
12
+
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
13
+
#
14
+
# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing
Write-Host"`tEnsuring private source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource"
103
+
# Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries
Write-PipelineTelemetryError-Category 'Build'-Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
110
+
ExitWithExitCode 1
111
+
}
112
+
113
+
if (!$Password) {
114
+
Write-PipelineTelemetryError-Category 'Build'-Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
115
+
ExitWithExitCode 1
116
+
}
117
+
118
+
# Load NuGet.config
119
+
$doc=New-Object System.Xml.XmlDocument
120
+
$filename= (Get-Item$ConfigFile).FullName
121
+
$doc.Load($filename)
122
+
123
+
# Get reference to <PackageSources> or create one if none exist already
0 commit comments