Skip to content

Commit 860e2d4

Browse files
gavinbarronCopilot
andauthored
Route NuGet restore through the CFS central package feed (#3151)
Routes CI package restore through the authenticated GraphDeveloperExperiences_Public Azure Artifacts feed (network isolation / CFS compliance). Requires a pipeline run to validate against the feed. Copilot-Session: 9bd6fe40-0d69-4e3f-927b-8628c0ab6d34 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 135e7ba commit 860e2d4

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.azure-pipelines/ci-build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,27 @@ extends:
6262
packageType: sdk
6363
version: 10.x
6464

65+
- task: NuGetAuthenticate@1
66+
displayName: 'Authenticate to Azure Artifacts'
67+
68+
- pwsh: |
69+
@"
70+
<?xml version="1.0" encoding="utf-8"?>
71+
<configuration>
72+
<packageSources>
73+
<clear />
74+
<add key="GraphDeveloperExperiences_Public" value="https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/GraphDeveloperExperiences_Public/nuget/v3/index.json" />
75+
</packageSources>
76+
</configuration>
77+
"@ | Set-Content -Path "$(Build.SourcesDirectory)/nuget.config" -Encoding UTF8
78+
displayName: 'Create nuget.config (central feed)'
6579
- task: DotNetCoreCLI@2
6680
displayName: 'dotnet restore'
6781
inputs:
6882
command: restore
6983
projects: '**/*.csproj'
84+
feedsToUse: "config"
85+
nugetConfigPath: "$(Build.SourcesDirectory)/nuget.config"
7086
- powershell: |
7187
# This allows us to not have to checkin .csproj files with DelaySign and SignAssembly set to to true. If the flag is set,
7288
# then project is not debuggable with SignAssembly set to true.

0 commit comments

Comments
 (0)